diff options
Diffstat (limited to 'src/gmrequest.c')
-rw-r--r-- | src/gmrequest.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gmrequest.c b/src/gmrequest.c index ebb66a84..c2c94888 100644 --- a/src/gmrequest.c +++ b/src/gmrequest.c | |||
@@ -401,9 +401,9 @@ void submit_GmRequest(iGmRequest *d) { | |||
401 | clear_GmResponse(&d->resp); | 401 | clear_GmResponse(&d->resp); |
402 | iUrl url; | 402 | iUrl url; |
403 | init_Url(&url, &d->url); | 403 | init_Url(&url, &d->url); |
404 | /* Check for special protocols. */ | 404 | /* Check for special schemes. */ |
405 | /* TODO: If this were a library, these could be handled via callbacks. */ | 405 | /* TODO: If this were a library, these could be handled via callbacks. */ |
406 | if (equalCase_Rangecc(url.protocol, "about")) { | 406 | if (equalCase_Rangecc(url.scheme, "about")) { |
407 | const iBlock *src = aboutPageSource_(url.path); | 407 | const iBlock *src = aboutPageSource_(url.path); |
408 | if (src) { | 408 | if (src) { |
409 | d->resp.statusCode = success_GmStatusCode; | 409 | d->resp.statusCode = success_GmStatusCode; |
@@ -419,7 +419,7 @@ void submit_GmRequest(iGmRequest *d) { | |||
419 | iNotifyAudience(d, finished, GmRequestFinished); | 419 | iNotifyAudience(d, finished, GmRequestFinished); |
420 | return; | 420 | return; |
421 | } | 421 | } |
422 | else if (equalCase_Rangecc(url.protocol, "file")) { | 422 | else if (equalCase_Rangecc(url.scheme, "file")) { |
423 | iString *path = collect_String(urlDecode_String(collect_String(newRange_String(url.path)))); | 423 | iString *path = collect_String(urlDecode_String(collect_String(newRange_String(url.path)))); |
424 | iFile * f = new_File(path); | 424 | iFile * f = new_File(path); |
425 | if (open_File(f, readOnly_FileMode)) { | 425 | if (open_File(f, readOnly_FileMode)) { |
@@ -457,9 +457,9 @@ void submit_GmRequest(iGmRequest *d) { | |||
457 | iNotifyAudience(d, finished, GmRequestFinished); | 457 | iNotifyAudience(d, finished, GmRequestFinished); |
458 | return; | 458 | return; |
459 | } | 459 | } |
460 | else if (equalCase_Rangecc(url.protocol, "data")) { | 460 | else if (equalCase_Rangecc(url.scheme, "data")) { |
461 | d->resp.statusCode = success_GmStatusCode; | 461 | d->resp.statusCode = success_GmStatusCode; |
462 | iString *src = collectNewCStr_String(url.protocol.start + 5); | 462 | iString *src = collectNewCStr_String(url.scheme.start + 5); |
463 | iRangecc header = { constBegin_String(src), constBegin_String(src) }; | 463 | iRangecc header = { constBegin_String(src), constBegin_String(src) }; |
464 | while (header.end < constEnd_String(src) && *header.end != ',') { | 464 | while (header.end < constEnd_String(src) && *header.end != ',') { |
465 | header.end++; | 465 | header.end++; |