#endif
#include "php.h"
+#include "php_ini.h"
#include "ext/standard/info.h"
#include "ext/session/php_session.h"
#include "ext/standard/php_string.h"
* 0 => array(
* 'Status' => '200 Ok',
* 'Content-Type' => 'text/plain',
-
* 'Content-Language' => 'en-US'
* ),
* 1 => "Hello World!"
}
if (!arg_sep_len) {
- arg_sep = HTTP_URL_ARGSEP_DEFAULT;
+ arg_sep = HTTP_URL_ARGSEP;
}
formstr = phpstr_new();
- if (SUCCESS != http_urlencode_hash_implementation_ex(HASH_OF(formdata), formstr, arg_sep, prefix, prefix_len, NULL, 0, NULL, 0, (Z_TYPE_P(formdata) == IS_OBJECT ? formdata : NULL) TSRMLS_CC)) {
+ if (SUCCESS != http_urlencode_hash_implementation_ex(HASH_OF(formdata), formstr, arg_sep, prefix, prefix_len, NULL, 0, NULL, 0, (Z_TYPE_P(formdata) == IS_OBJECT ? formdata : NULL))) {
phpstr_free(formstr);
RETURN_FALSE;
}
PHP_FUNCTION(http_test)
{
-#define HTTP_MESSAGE_STR \
- "GET / HTTP/1.1\r\n" \
- "Content-Type: foo/bar\r\n" \
- "Robots: Noindex,Nofollow\r\n" \
- "\r\n" \
- "Body Data!\n"
-#define HTTP_MESSAGE_LEN lenof(HTTP_MESSAGE_STR)
- http_message *msg = http_message_parse(HTTP_MESSAGE_STR, HTTP_MESSAGE_LEN);
- char *str;
- size_t len;
-
- http_message_tostring(msg, &str, &len);
-
- RETVAL_STRINGL(str, len, 0);
- http_message_free(msg);
}
/*