Quote
guenter
Quote
disrupted
i found a lot of 'pipelinning' going on inside this file:
necko_http.xpt
Nice find. I did not know that this search could also be done inside xpt
AFAIK xpt - make that dll are scriptable.
I presume this is a file responsible to script necko.dll (so gorilla needs to alter necko.dll). He posted some C (?) code that limits things to 8 a while ago.
I would have tried to find that code inside Mozilla sources.
Then try to compile. Can be done for components but no idea how?
Maybe Hex editor inside the finished dll file is possible too (no idea how to do).
Mozilla Cross-Reference seamonkey
mozilla/ netwerk/ protocol/ http/ src/ nsHttp.h
CVS Log
CVS Blame
CVS Graph
Diff file
Raw file
changes to
this file in
the last: day
week
month
view using tree:
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* vim:set ts=4 sw=4 sts=4 et cin: */
3 /* ***** BEGIN LICENSE BLOCK *****
4 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
5 *
6 * The contents of this file are subject to the Mozilla Public License Version
7 * 1.1 (the "License"); you may not use this file except in compliance with
8 * the License. You may obtain a copy of the License at
9 *
http://www.mozilla.org/MPL/
10 *
11 * Software distributed under the License is distributed on an "AS IS" basis,
12 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
13 * for the specific language governing rights and limitations under the
14 * License.
15 *
16 * The Original Code is Mozilla.
17 *
18 * The Initial Developer of the Original Code is
19 * Netscape Communications.
20 * Portions created by the Initial Developer are Copyright (C) 2001
21 * the Initial Developer. All Rights Reserved.
22 *
23 * Contributor(s):
24 * Darin Fisher <darin@netscape.com> (original author)
25 *
26 * Alternatively, the contents of this file may be used under the terms of
27 * either the GNU General Public License Version 2 or later (the "GPL"), or
28 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
29 * in which case the provisions of the GPL or the LGPL are applicable instead
30 * of those above. If you wish to allow use of your version of this file only
31 * under the terms of either the GPL or the LGPL, and not to allow others to
32 * use your version of this file under the terms of the MPL, indicate your
33 * decision by deleting the provisions above and replace them with the notice
34 * and other provisions required by the GPL or the LGPL. If you do not delete
35 * the provisions above, a recipient may use your version of this file under
36 * the terms of any one of the MPL, the GPL or the LGPL.
37 *
38 * ***** END LICENSE BLOCK ***** */
39
40 #ifndef nsHttp_h__
41 #define nsHttp_h__
42
43 #if defined(MOZ_LOGGING)
44 #define FORCE_PR_LOG
45 #endif
46
47 #include "plstr.h"
48 #include "prlog.h"
49 #include "prtime.h"
50 #include "nsISupportsUtils.h"
51 #include "nsPromiseFlatString.h"
52 #include "nsURLHelper.h"
53 #include "netCore.h"
54
55 #if defined(PR_LOGGING)
56 //
57 // Log module for HTTP Protocol logging...
58 //
59 // To enable logging (see prlog.h for full details):
60 //
61 // set NSPR_LOG_MODULES=nsHttp:5
62 // set NSPR_LOG_FILE=http.log
63 //
64 // this enables PR_LOG_ALWAYS level information and places all output in
65 // the file http.log
66 //
67 extern PRLogModuleInfo *gHttpLog;
68 #endif
69
70 // http logging
71 #define LOG1(args) PR_LOG(gHttpLog, 1, args)
72 #define LOG2(args) PR_LOG(gHttpLog, 2, args)
73 #define LOG3(args) PR_LOG(gHttpLog, 3, args)
74 #define LOG4(args) PR_LOG(gHttpLog, 4, args)
75 #define LOG(args) LOG4(args)
76
77 #define LOG1_ENABLED() PR_LOG_TEST(gHttpLog, 1)
78 #define LOG2_ENABLED() PR_LOG_TEST(gHttpLog, 2)
79 #define LOG3_ENABLED() PR_LOG_TEST(gHttpLog, 3)
80 #define LOG4_ENABLED() PR_LOG_TEST(gHttpLog, 4)
81 #define LOG_ENABLED() LOG4_ENABLED()
82
83 // http default buffer geometry
84 #define NS_HTTP_SEGMENT_SIZE 4096
85 #define NS_HTTP_SEGMENT_COUNT 16 // 64k maximum
86 #define NS_HTTP_MAX_ODA_SIZE (NS_HTTP_SEGMENT_SIZE * 4) // 16k
87
88 // http version codes
89 #define NS_HTTP_VERSION_UNKNOWN 0
90 #define NS_HTTP_VERSION_0_9 9
91 #define NS_HTTP_VERSION_1_0 10
92 #define NS_HTTP_VERSION_1_1 11
93
94 typedef PRUint8 nsHttpVersion;
95
96 //-----------------------------------------------------------------------------
97 // http connection capabilities
98 //-----------------------------------------------------------------------------
99
100 #define NS_HTTP_ALLOW_KEEPALIVE (1<<0)
101 #define NS_HTTP_ALLOW_PIPELINING (1<<1)
102
103 // a transaction with this caps flag will continue to own the connection,
104 // preventing it from being reclaimed, even after the transaction completes.
105 #define NS_HTTP_STICKY_CONNECTION (1<<2)
106
107 //-----------------------------------------------------------------------------
108 // some default values
109 //-----------------------------------------------------------------------------
110
111 // hard upper limit on the number of requests that can be pipelined
112 #define NS_HTTP_MAX_PIPELINED_REQUESTS 8
113
114 #define NS_HTTP_DEFAULT_PORT 80
115 #define NS_HTTPS_DEFAULT_PORT 443
116
117 #define NS_HTTP_HEADER_SEPS ", \t"
118
119 //-----------------------------------------------------------------------------
120 // http atoms...
121 //-----------------------------------------------------------------------------
122
123 struct nsHttpAtom
124 {
125 operator const char *() const { return _val; }
126 const char *get() const { return _val; }
127
128 void operator=(const char *v) { _val = v; }
129 void operator=(const nsHttpAtom &a) { _val = a._val; }
130
131 // private
132 const char *_val;
133 };
134
135 struct nsHttp
136 {
137 static nsresult CreateAtomTable();
138 static void DestroyAtomTable();
139
140 // will dynamically add atoms to the table if they don't already exist
141 static nsHttpAtom ResolveAtom(const char *);
142 static nsHttpAtom ResolveAtom(const nsACString &s)
143 {
144 return ResolveAtom(PromiseFlatCString(s).get());
145 }
146
147 // returns true if the specified token [start,end) is valid per RFC 2616
148 // section 2.2
149 static PRBool IsValidToken(const char *start, const char *end);
150
151 static inline PRBool IsValidToken(const nsCString &s) {
152 const char *start = s.get();
153 return IsValidToken(start, start + s.Length());
154 }
155
156 // find the first instance (case-insensitive comparison) of the given
157 // |token| in the |input| string. the |token| is bounded by elements of
158 // |separators| and may appear at the beginning or end of the |input|
159 // string. null is returned if the |token| is not found. |input| may be
160 // null, in which case null is returned.
161 static const char *FindToken(const char *input, const char *token,
162 const char *separators);
163
164 // This function parses a string containing a decimal-valued, non-negative
165 // 64-bit integer. If the value would exceed LL_MAXINT, then PR_FALSE is
166 // returned. Otherwise, this function returns PR_TRUE and stores the
167 // parsed value in |result|. The next unparsed character in |input| is
168 // optionally returned via |next| if |next| is non-null.
169 //
170 // TODO(darin): Replace this with something generic.
171 //
172 static PRBool ParseInt64(const char *input, const char **next,
173 PRInt64 *result);
174
175 // Variant on ParseInt64 that expects the input string to contain nothing
176 // more than the value being parsed.
177 static inline PRBool ParseInt64(const char *input, PRInt64 *result) {
178 const char *next;
179 return ParseInt64(input, &next, result) && *next == '\0';
180 }
181
182 // Declare all atoms
183 //
184 // The atom names and values are stored in nsHttpAtomList.h and are brought
185 // to you by the magic of C preprocessing. Add new atoms to nsHttpAtomList
186 // and all support logic will be auto-generated.
187 //
188 #define HTTP_ATOM(_name, _value) static nsHttpAtom _name;
189 #include "nsHttpAtomList.h"
190 #undef HTTP_ATOM
191 };
192
193 //-----------------------------------------------------------------------------
194 // utilities...
195 //-----------------------------------------------------------------------------
196
197 static inline PRUint32
198 PRTimeToSeconds(PRTime t_usec)
199 {
200 return PRUint32( t_usec / PR_USEC_PER_SEC );
201 }
202
203 #define NowInSeconds() PRTimeToSeconds(PR_Now())
204
205 // ripped from glib.h
206 #undef CLAMP
207 #define CLAMP(x, low, high) (((x) > (high)) ? (high) : (((x) < (low)) ? (low) : (x)))
208
209 // round q-value to one decimal place; return most significant digit as uint.
210 #define QVAL_TO_UINT(q) ((unsigned int) ((q + 0.05) * 10.0))
211
212 #define HTTP_LWS " \t"
213 #define HTTP_HEADER_VALUE_SEPS HTTP_LWS ","
214
215 #endif // nsHttp_h__
216
This page was automatically generated by MXR.
SOURCE
OK SO THE FILE WE NEED TO EDIT IS IN /seamonkey/
source/netwerk/protocol/http/src/nsHttp.h
Now from here on i am fucking lost....As i told you i can read some of the code I can follow the programer`s logik but soon after i lose it..
I am still learning C++
Corect me if i am wrogn ,but the way I see it is compile this page only or the Http protocol only and you will end up probably with some .xpt adn some Dll`s which would replace the other ones in a normal K-meleon instalation..
But then again ,I might be wrong...
That`s why we need a programer...I mean a real one, not a wannabe like me
...Do we have anyone around..???
Cheers!
Edited 2 time(s). Last edit at 02/12/2009 09:28AM by Gorilla no baka.