Lines 239-244
Link Here
|
239 |
* the reason for the gotos. -djg |
239 |
* the reason for the gotos. -djg |
240 |
*/ |
240 |
*/ |
241 |
if (uri[0] == '/') { |
241 |
if (uri[0] == '/') { |
|
|
242 |
/* RFC2396 #4.3 says that two leading slashes mean we have an |
243 |
authority component, not a path! Fixing this looks scary |
244 |
with the gotos here. But if the existing logic is valid, |
245 |
then presumably a goto pointing to deal_with_authority works. |
246 |
|
247 |
RFC2396 describes this as resolving an ambiguity. In the |
248 |
case of three or more slashes there would seem to be no |
249 |
ambiguity, so it is a path after all. |
250 |
*/ |
251 |
if (uri[1] == '/' && uri[2] != '/') { |
252 |
s = uri + 2 ; |
253 |
goto deal_with_authority ; |
254 |
} |
242 |
deal_with_path: |
255 |
deal_with_path: |
243 |
/* we expect uri to point to first character of path ... remember |
256 |
/* we expect uri to point to first character of path ... remember |
244 |
* that the path could be empty -- http://foobar?query for example |
257 |
* that the path could be empty -- http://foobar?query for example |
Lines 282-287
Link Here
|
282 |
|
295 |
|
283 |
uptr->scheme = apr_pstrmemdup(p, uri, s - uri); |
296 |
uptr->scheme = apr_pstrmemdup(p, uri, s - uri); |
284 |
s += 3; |
297 |
s += 3; |
|
|
298 |
|
299 |
deal_with_authority: |
285 |
hostinfo = s; |
300 |
hostinfo = s; |
286 |
while ((uri_delims[*(unsigned char *)s] & NOTEND_HOSTINFO) == 0) { |
301 |
while ((uri_delims[*(unsigned char *)s] & NOTEND_HOSTINFO) == 0) { |
287 |
++s; |
302 |
++s; |