projects
/
m6w6
/
ext-apfd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
|
github
raw
|
patch
|
inline
| side by side (from parent 1:
bbe2694
)
s/SG(...)/.../
author
Michael Wallner
<mike@php.net>
Fri, 24 Sep 2021 14:05:53 +0000
(16:05 +0200)
committer
Michael Wallner
<mike@php.net>
Fri, 24 Sep 2021 14:05:53 +0000
(16:05 +0200)
php_apfd.c
patch
|
blob
|
history
diff --git
a/php_apfd.c
b/php_apfd.c
index 48e767f62eecac61caa7c86c9895ecffaf05e1ef..4159620236ff99c614454573f678636062d9fae2 100644
(file)
--- a/
php_apfd.c
+++ b/
php_apfd.c
@@
-100,13
+100,15
@@
PHP_RINIT_FUNCTION(apfd)
# define TSRMLS_C
# define TSRMLS_CC
#endif
# define TSRMLS_C
# define TSRMLS_CC
#endif
+ sapi_request_info *req = &SG(request_info);
+
/* populate form data on non-POST requests */
/* populate form data on non-POST requests */
- if (
SG(request_info).request_method && strcasecmp(SG(request_info).request_method, "POST") && SG(request_info).content_type && *SG(request_info).
content_type) {
- char *ct_str, *ct_dup = estrdup(
SG(request_info).
content_type);
+ if (
req->request_method && strcasecmp(req->request_method, "POST") && req->content_type && *req->
content_type) {
+ char *ct_str, *ct_dup = estrdup(
req->
content_type);
size_t ct_end = strcspn(ct_dup, ";, ");
sapi_post_entry *post_entry = NULL;
size_t ct_end = strcspn(ct_dup, ";, ");
sapi_post_entry *post_entry = NULL;
-
SG(request_info).
content_type_dup = ct_dup;
+
req->
content_type_dup = ct_dup;
ct_str = zend_str_tolower_dup(ct_dup, ct_end);
if ((post_entry = apfd_get_post_entry(ct_str, ct_end TSRMLS_CC))) {
ct_str = zend_str_tolower_dup(ct_dup, ct_end);
if ((post_entry = apfd_get_post_entry(ct_str, ct_end TSRMLS_CC))) {
@@
-114,7
+116,7
@@
PHP_RINIT_FUNCTION(apfd)
apfd_backup(&apfd TSRMLS_CC);
apfd_backup(&apfd TSRMLS_CC);
-
SG(request_info).
post_entry = post_entry;
+
req->
post_entry = post_entry;
if (post_entry->post_reader) {
post_entry->post_reader(TSRMLS_C);
if (post_entry->post_reader) {
post_entry->post_reader(TSRMLS_C);
@@
-130,9
+132,9
@@
PHP_RINIT_FUNCTION(apfd)
}
efree(ct_str);
}
efree(ct_str);
- if (
SG(request_info).
content_type_dup) {
- efree(
SG(request_info).
content_type_dup);
-
SG(request_info).
content_type_dup = NULL;
+ if (
req->
content_type_dup) {
+ efree(
req->
content_type_dup);
+
req->
content_type_dup = NULL;
}
}
}
}