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:
ecdfaaa
)
- create a request body only if there's something to feed into http_request_body_fill()
author
Michael Wallner
<mike@php.net>
Sat, 7 Jan 2006 17:02:27 +0000
(17:02 +0000)
committer
Michael Wallner
<mike@php.net>
Sat, 7 Jan 2006 17:02:27 +0000
(17:02 +0000)
http_request_object.c
patch
|
blob
|
history
diff --git
a/http_request_object.c
b/http_request_object.c
index c8fe26d0334185fd30de4f8bf14c4be1ce953314..ad6e43202b1b421c88773427ad1dd2e06d89675d 100644
(file)
--- a/
http_request_object.c
+++ b/
http_request_object.c
@@
-503,8
+503,10
@@
STATUS _http_request_object_requesthandler(http_request_object *obj, zval *this_
fields = (Z_TYPE_P(zfields) == IS_ARRAY) ? Z_ARRVAL_P(zfields) : NULL;
files = (Z_TYPE_P(zfiles) == IS_ARRAY) ? Z_ARRVAL_P(zfiles) : NULL;
fields = (Z_TYPE_P(zfields) == IS_ARRAY) ? Z_ARRVAL_P(zfields) : NULL;
files = (Z_TYPE_P(zfiles) == IS_ARRAY) ? Z_ARRVAL_P(zfiles) : NULL;
- if (!(obj->request->body = http_request_body_fill(obj->request->body, fields, files))) {
- status = FAILURE;
+ if ((fields && zend_hash_num_elements(fields)) || (files && zend_hash_num_elements(files))) {
+ if (!(obj->request->body = http_request_body_fill(obj->request->body, fields, files))) {
+ status = FAILURE;
+ }
}
}
}
}
}
}