projects
/
m6w6
/
ext-http
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
|
github
raw
|
patch
| inline |
side by side
(parent:
29f0a9a
)
- fix requests for the first byte only
author
Michael Wallner
<mike@php.net>
Sun, 11 Feb 2007 17:44:17 +0000
(17:44 +0000)
committer
Michael Wallner
<mike@php.net>
Sun, 11 Feb 2007 17:44:17 +0000
(17:44 +0000)
http_headers_api.c
patch
|
blob
|
history
diff --git
a/http_headers_api.c
b/http_headers_api.c
index bdee9a39069f741be65cda5f07fe9ad209474cce..87af7586e114887ad29c89b7ba968c03e313cf66 100644
(file)
--- a/
http_headers_api.c
+++ b/
http_headers_api.c
@@
-253,13
+253,21
@@
PHP_HTTP_API http_range_status _http_get_request_ranges(HashTable *ranges, size_
switch (begin) {
/* "0-12345" */
case -10:
- /* "0-" */
- if (end == -1) {
- return RANGE_NO;
- }
- /* "0-0" or overflow */
- if (end == -10 || length <= (size_t) end) {
- return RANGE_ERR;
+ switch (end) {
+ /* "0-" */
+ case -1:
+ return RANGE_NO;
+
+ /* "0-0" */
+ case -10:
+ end = 0;
+ break;
+
+ default:
+ if (length <= (size_t) end) {
+ return RANGE_ERR;
+ }
+ break;
}
begin = 0;
break;