* add a real separator vs. a type juggler
[m6w6/ext-http] / php_http_url.c
1 /*
2 +--------------------------------------------------------------------+
3 | PECL :: http |
4 +--------------------------------------------------------------------+
5 | Redistribution and use in source and binary forms, with or without |
6 | modification, are permitted provided that the conditions mentioned |
7 | in the accompanying LICENSE file are met. |
8 +--------------------------------------------------------------------+
9 | Copyright (c) 2004-2010, Michael Wallner <mike@php.net> |
10 +--------------------------------------------------------------------+
11 */
12
13 /* $Id: http_url_api.c 292841 2009-12-31 08:48:57Z mike $ */
14
15 #include "php_http.h"
16
17 #include <main/SAPI.h>
18 #include <ext/standard/php_string.h>
19
20 static inline char *localhostname(void)
21 {
22 char hostname[1024] = {0};
23
24 #ifdef PHP_WIN32
25 if (SUCCESS == gethostname(hostname, lenof(hostname))) {
26 return estrdup(hostname);
27 }
28 #elif defined(HAVE_GETHOSTNAME)
29 if (SUCCESS == gethostname(hostname, lenof(hostname))) {
30 # if defined(HAVE_GETDOMAINNAME)
31 size_t hlen = strlen(hostname);
32 if (hlen <= lenof(hostname) - lenof("(none)")) {
33 hostname[hlen++] = '.';
34 if (SUCCESS == getdomainname(&hostname[hlen], lenof(hostname) - hlen)) {
35 if (!strcmp(&hostname[hlen], "(none)")) {
36 hostname[hlen - 1] = '\0';
37 }
38 return estrdup(hostname);
39 }
40 }
41 # endif
42 if (strcmp(hostname, "(none)")) {
43 return estrdup(hostname);
44 }
45 }
46 #endif
47 return estrndup("localhost", lenof("localhost"));
48 }
49
50 PHP_HTTP_API char *php_http_url_absolute(const char *url, int flags TSRMLS_DC)
51 {
52 char *abs = NULL;
53 php_url *purl = NULL;
54
55 if (url) {
56 purl = php_url_parse(abs = estrdup(url));
57 STR_SET(abs, NULL);
58 if (!purl) {
59 php_http_error(HE_WARNING, PHP_HTTP_E_URL, "Could not parse URL (%s)", url);
60 return NULL;
61 }
62 }
63
64 php_http_url(flags, purl, NULL, NULL, &abs, NULL TSRMLS_CC);
65
66 if (purl) {
67 php_url_free(purl);
68 }
69
70 return abs;
71 }
72
73 PHP_HTTP_API void php_http_url(int flags, const php_url *old_url, const php_url *new_url, php_url **url_ptr, char **url_str, size_t *url_len TSRMLS_DC)
74 {
75 #if defined(HAVE_GETSERVBYPORT) || defined(HAVE_GETSERVBYNAME)
76 struct servent *se;
77 #endif
78 php_url *url = ecalloc(1, sizeof(php_url));
79
80 #define __URLSET(u,n) \
81 ((u)&&(u)->n)
82 #define __URLCPY(n) \
83 url->n = __URLSET(new_url,n) ? estrdup(new_url->n) : (__URLSET(old_url,n) ? estrdup(old_url->n) : NULL)
84
85 if (!(flags & PHP_HTTP_URL_STRIP_PORT)) {
86 url->port = __URLSET(new_url, port) ? new_url->port : ((old_url) ? old_url->port : 0);
87 }
88 if (!(flags & PHP_HTTP_URL_STRIP_USER)) {
89 __URLCPY(user);
90 }
91 if (!(flags & PHP_HTTP_URL_STRIP_PASS)) {
92 __URLCPY(pass);
93 }
94
95 __URLCPY(scheme);
96 __URLCPY(host);
97
98 if (!(flags & PHP_HTTP_URL_STRIP_PATH)) {
99 if ((flags & PHP_HTTP_URL_JOIN_PATH) && __URLSET(old_url, path) && __URLSET(new_url, path) && *new_url->path != '/') {
100 size_t old_path_len = strlen(old_url->path), new_path_len = strlen(new_url->path);
101
102 url->path = ecalloc(1, old_path_len + new_path_len + 1 + 1);
103
104 strcat(url->path, old_url->path);
105 if (url->path[old_path_len - 1] != '/') {
106 php_dirname(url->path, old_path_len);
107 strcat(url->path, "/");
108 }
109 strcat(url->path, new_url->path);
110 } else {
111 __URLCPY(path);
112 }
113 }
114 if (!(flags & PHP_HTTP_URL_STRIP_QUERY)) {
115 if ((flags & PHP_HTTP_URL_JOIN_QUERY) && __URLSET(new_url, query) && __URLSET(old_url, query)) {
116 zval qarr, qstr;
117
118 INIT_PZVAL(&qstr);
119 INIT_PZVAL(&qarr);
120 array_init(&qarr);
121
122 ZVAL_STRING(&qstr, old_url->query, 0);
123 php_http_querystring_modify(&qarr, &qstr TSRMLS_CC);
124 ZVAL_STRING(&qstr, new_url->query, 0);
125 php_http_querystring_modify(&qarr, &qstr TSRMLS_CC);
126
127 ZVAL_NULL(&qstr);
128 php_http_querystring_update(&qarr, &qstr TSRMLS_CC);
129 url->query = Z_STRVAL(qstr);
130 zval_dtor(&qarr);
131 } else {
132 __URLCPY(query);
133 }
134 }
135 if (!(flags & PHP_HTTP_URL_STRIP_FRAGMENT)) {
136 __URLCPY(fragment);
137 }
138
139 if (!url->scheme) {
140 if (flags & PHP_HTTP_URL_FROM_ENV) {
141 zval *https = php_http_env_get_server_var(ZEND_STRL("HTTPS"), 1 TSRMLS_CC);
142 if (https && !strcasecmp(Z_STRVAL_P(https), "ON")) {
143 url->scheme = estrndup("https", lenof("https"));
144 } else switch (url->port) {
145 case 443:
146 url->scheme = estrndup("https", lenof("https"));
147 break;
148
149 #ifndef HAVE_GETSERVBYPORT
150 default:
151 #endif
152 case 80:
153 case 0:
154 url->scheme = estrndup("http", lenof("http"));
155 break;
156
157 #ifdef HAVE_GETSERVBYPORT
158 default:
159 if ((se = getservbyport(htons(url->port), "tcp")) && se->s_name) {
160 url->scheme = estrdup(se->s_name);
161 } else {
162 url->scheme = estrndup("http", lenof("http"));
163 }
164 break;
165 #endif
166 }
167 } else {
168 url->scheme = estrndup("http", lenof("http"));
169 }
170 }
171
172 if (!url->host) {
173 if (flags & PHP_HTTP_URL_FROM_ENV) {
174 zval *zhost;
175
176 if ((((zhost = php_http_env_get_server_var(ZEND_STRL("HTTP_HOST"), 1 TSRMLS_CC)) ||
177 (zhost = php_http_env_get_server_var(ZEND_STRL("SERVER_NAME"), 1 TSRMLS_CC)))) && Z_STRLEN_P(zhost)) {
178 url->host = estrndup(Z_STRVAL_P(zhost), Z_STRLEN_P(zhost));
179 } else {
180 url->host = localhostname();
181 }
182 } else {
183 url->host = estrndup("localhost", lenof("localhost"));
184 }
185 }
186
187 if (!url->path) {
188 if ((flags & PHP_HTTP_URL_FROM_ENV) && SG(request_info).request_uri && SG(request_info).request_uri[0]) {
189 const char *q = strchr(SG(request_info).request_uri, '?');
190
191 if (q) {
192 url->path = estrndup(SG(request_info).request_uri, q - SG(request_info).request_uri);
193 } else {
194 url->path = estrdup(SG(request_info).request_uri);
195 }
196 } else {
197 url->path = estrndup("/", 1);
198 }
199 } else if (url->path[0] != '/') {
200 if ((flags & PHP_HTTP_URL_FROM_ENV) && SG(request_info).request_uri && SG(request_info).request_uri[0]) {
201 size_t ulen = strlen(SG(request_info).request_uri);
202 size_t plen = strlen(url->path);
203 char *path;
204
205 if (SG(request_info).request_uri[ulen-1] != '/') {
206 for (--ulen; ulen && SG(request_info).request_uri[ulen - 1] != '/'; --ulen);
207 }
208
209 path = emalloc(ulen + plen + 1);
210 memcpy(path, SG(request_info).request_uri, ulen);
211 memcpy(path + ulen, url->path, plen);
212 path[ulen + plen] = '\0';
213 STR_SET(url->path, path);
214 } else {
215 size_t plen = strlen(url->path);
216 char *path = emalloc(plen + 1 + 1);
217
218 path[0] = '/';
219 memcpy(&path[1], url->path, plen + 1);
220 STR_SET(url->path, path);
221 }
222 }
223 /* replace directory references if path is not a single slash */
224 if (url->path[0] && (url->path[0] != '/' || url->path[1])) {
225 char *ptr, *end = url->path + strlen(url->path) + 1;
226
227 for (ptr = strstr(url->path, "/."); ptr; ptr = strstr(ptr, "/.")) {
228 switch (ptr[2]) {
229 case '\0':
230 ptr[1] = '\0';
231 break;
232
233 case '/':
234 memmove(&ptr[1], &ptr[3], end - &ptr[3]);
235 break;
236
237 case '.':
238 if (ptr[3] == '/') {
239 char *pos = &ptr[4];
240 while (ptr != url->path) {
241 if (*--ptr == '/') {
242 break;
243 }
244 }
245 memmove(&ptr[1], pos, end - pos);
246 break;
247 } else if (!ptr[3]) {
248 /* .. at the end */
249 ptr[1] = '\0';
250 }
251 /* fallthrough */
252
253 default:
254 /* something else */
255 ++ptr;
256 break;
257 }
258 }
259 }
260
261 if (url->port) {
262 if ( ((url->port == 80) && !strcmp(url->scheme, "http"))
263 || ((url->port ==443) && !strcmp(url->scheme, "https"))
264 #ifdef HAVE_GETSERVBYNAME
265 || ((se = getservbyname(url->scheme, "tcp")) && se->s_port &&
266 (url->port == ntohs(se->s_port)))
267 #endif
268 ) {
269 url->port = 0;
270 }
271 }
272
273 if (url_str) {
274 size_t len;
275
276 *url_str = emalloc(PHP_HTTP_URL_MAXLEN + 1);
277
278 **url_str = '\0';
279 strlcat(*url_str, url->scheme, PHP_HTTP_URL_MAXLEN);
280 strlcat(*url_str, "://", PHP_HTTP_URL_MAXLEN);
281
282 if (url->user && *url->user) {
283 strlcat(*url_str, url->user, PHP_HTTP_URL_MAXLEN);
284 if (url->pass && *url->pass) {
285 strlcat(*url_str, ":", PHP_HTTP_URL_MAXLEN);
286 strlcat(*url_str, url->pass, PHP_HTTP_URL_MAXLEN);
287 }
288 strlcat(*url_str, "@", PHP_HTTP_URL_MAXLEN);
289 }
290
291 strlcat(*url_str, url->host, PHP_HTTP_URL_MAXLEN);
292
293 if (url->port) {
294 char port_str[8];
295
296 snprintf(port_str, sizeof(port_str), "%d", (int) url->port);
297 strlcat(*url_str, ":", PHP_HTTP_URL_MAXLEN);
298 strlcat(*url_str, port_str, PHP_HTTP_URL_MAXLEN);
299 }
300
301 strlcat(*url_str, url->path, PHP_HTTP_URL_MAXLEN);
302
303 if (url->query && *url->query) {
304 strlcat(*url_str, "?", PHP_HTTP_URL_MAXLEN);
305 strlcat(*url_str, url->query, PHP_HTTP_URL_MAXLEN);
306 }
307
308 if (url->fragment && *url->fragment) {
309 strlcat(*url_str, "#", PHP_HTTP_URL_MAXLEN);
310 strlcat(*url_str, url->fragment, PHP_HTTP_URL_MAXLEN);
311 }
312
313 if (PHP_HTTP_URL_MAXLEN == (len = strlen(*url_str))) {
314 php_http_error(HE_NOTICE, PHP_HTTP_E_URL, "Length of URL exceeds PHP_HTTP_URL_MAXLEN");
315 }
316 if (url_len) {
317 *url_len = len;
318 }
319 }
320
321 if (url_ptr) {
322 *url_ptr = url;
323 } else {
324 php_url_free(url);
325 }
326 }
327
328 PHP_HTTP_API STATUS php_http_url_encode_hash(HashTable *hash, zend_bool override_argsep, char *pre_encoded_data, size_t pre_encoded_len, char **encoded_data, size_t *encoded_len TSRMLS_DC)
329 {
330 char *arg_sep;
331 size_t arg_sep_len;
332 php_http_buffer_t *qstr = php_http_buffer_new();
333
334 if (override_argsep || !(arg_sep_len = strlen(arg_sep = INI_STR("arg_separator.output")))) {
335 arg_sep = PHP_HTTP_URL_ARGSEP;
336 arg_sep_len = lenof(PHP_HTTP_URL_ARGSEP);
337 }
338
339 if (pre_encoded_len && pre_encoded_data) {
340 php_http_buffer_append(qstr, pre_encoded_data, pre_encoded_len);
341 }
342
343 if (SUCCESS != php_http_url_encode_hash_recursive(hash, qstr, arg_sep, arg_sep_len, NULL, 0)) {
344 php_http_buffer_free(&qstr);
345 return FAILURE;
346 }
347
348 php_http_buffer_data(qstr, encoded_data, encoded_len);
349 php_http_buffer_free(&qstr);
350
351 return SUCCESS;
352 }
353
354 PHP_HTTP_API STATUS php_http_url_encode_hash_recursive(HashTable *ht, php_http_buffer_t *str, const char *arg_sep, size_t arg_sep_len, const char *prefix, size_t prefix_len TSRMLS_DC)
355 {
356 php_http_array_hashkey_t key = php_http_array_hashkey_init(0);
357 zval **data = NULL;
358 HashPosition pos;
359
360 if (!ht || !str) {
361 php_http_error(HE_WARNING, PHP_HTTP_E_INVALID_PARAM, "Invalid parameters");
362 return FAILURE;
363 }
364 if (ht->nApplyCount > 0) {
365 return SUCCESS;
366 }
367
368 FOREACH_HASH_KEYVAL(pos, ht, key, data) {
369 char *encoded_key;
370 int encoded_len;
371 php_http_buffer_t new_prefix;
372
373 if (!data || !*data) {
374 php_http_buffer_dtor(str);
375 return FAILURE;
376 }
377
378 if (key.type == HASH_KEY_IS_STRING) {
379 if (!*key.str) {
380 /* only public properties */
381 continue;
382 }
383 if (key.len && key.str[key.len - 1] == '\0') {
384 --key.len;
385 }
386 encoded_key = php_url_encode(key.str, key.len, &encoded_len);
387 } else {
388 encoded_len = spprintf(&encoded_key, 0, "%ld", key.num);
389 }
390
391 {
392 php_http_buffer_init(&new_prefix);
393 if (prefix && prefix_len) {
394 php_http_buffer_append(&new_prefix, prefix, prefix_len);
395 php_http_buffer_appends(&new_prefix, "%5B");
396 }
397
398 php_http_buffer_append(&new_prefix, encoded_key, encoded_len);
399 efree(encoded_key);
400
401 if (prefix && prefix_len) {
402 php_http_buffer_appends(&new_prefix, "%5D");
403 }
404 php_http_buffer_fix(&new_prefix);
405 }
406
407 if (Z_TYPE_PP(data) == IS_ARRAY || Z_TYPE_PP(data) == IS_OBJECT) {
408 STATUS status;
409 ++ht->nApplyCount;
410 status = php_http_url_encode_hash_recursive(HASH_OF(*data), str, arg_sep, arg_sep_len, PHP_HTTP_BUFFER_VAL(&new_prefix), PHP_HTTP_BUFFER_LEN(&new_prefix) TSRMLS_CC);
411 --ht->nApplyCount;
412 if (SUCCESS != status) {
413 php_http_buffer_dtor(&new_prefix);
414 php_http_buffer_dtor(str);
415 return FAILURE;
416 }
417 } else {
418 zval *val = php_http_zsep(IS_STRING, *data);
419
420 if (PHP_HTTP_BUFFER_LEN(str)) {
421 php_http_buffer_append(str, arg_sep, arg_sep_len);
422 }
423 php_http_buffer_append(str, PHP_HTTP_BUFFER_VAL(&new_prefix), PHP_HTTP_BUFFER_LEN(&new_prefix));
424 php_http_buffer_appends(str, "=");
425
426 if (Z_STRLEN_P(val) && Z_STRVAL_P(val)) {
427 char *encoded_val;
428 int encoded_len;
429
430 encoded_val = php_url_encode(Z_STRVAL_P(val), Z_STRLEN_P(val), &encoded_len);
431 php_http_buffer_append(str, encoded_val, encoded_len);
432 efree(encoded_val);
433 }
434
435 zval_ptr_dtor(&val);
436 }
437 php_http_buffer_dtor(&new_prefix);
438 }
439 return SUCCESS;
440 }
441
442 #define PHP_HTTP_BEGIN_ARGS(method, req_args) PHP_HTTP_BEGIN_ARGS_EX(HttpUrl, method, 0, req_args)
443 #define PHP_HTTP_EMPTY_ARGS(method) PHP_HTTP_EMPTY_ARGS_EX(HttpUrl, method, 0)
444 #define PHP_HTTP_URL_ME(method, visibility) PHP_ME(HttpUrl, method, PHP_HTTP_ARGS(HttpUrl, method), visibility)
445
446 PHP_HTTP_BEGIN_ARGS(__construct, 0)
447 PHP_HTTP_ARG_VAL(old_url, 0)
448 PHP_HTTP_ARG_VAL(new_url, 0)
449 PHP_HTTP_ARG_VAL(flags, 0)
450 PHP_HTTP_END_ARGS;
451 PHP_HTTP_EMPTY_ARGS(toString);
452
453 zend_class_entry *php_http_url_class_entry;
454 zend_function_entry php_http_url_method_entry[] = {
455 PHP_HTTP_URL_ME(__construct, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR)
456 PHP_HTTP_URL_ME(toString, ZEND_ACC_PUBLIC)
457 ZEND_MALIAS(HttpUrl, __toString, toString, PHP_HTTP_ARGS(HttpUrl, toString), ZEND_ACC_PUBLIC)
458 EMPTY_FUNCTION_ENTRY
459 };
460
461 PHP_METHOD(HttpUrl, __construct)
462 {
463 with_error_handling(EH_THROW, PHP_HTTP_EX_CE(runtime)) {
464 zval *new_url = NULL, *old_url = NULL;
465 long flags = PHP_HTTP_URL_FROM_ENV;
466
467 if (SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|z!z!l", &old_url, &new_url, &flags)) {
468 with_error_handling(EH_THROW, PHP_HTTP_EX_CE(url)) {
469 php_url *res_purl, *new_purl = NULL, *old_purl = NULL;
470
471 if (new_url) {
472 switch (Z_TYPE_P(new_url)) {
473 case IS_OBJECT:
474 case IS_ARRAY:
475 new_purl = php_http_url_from_struct(NULL, HASH_OF(new_url) TSRMLS_CC);
476 break;
477 default: {
478 zval *cpy = php_http_zsep(IS_STRING, new_url);
479
480 new_purl = php_url_parse(Z_STRVAL_P(new_url));
481 zval_ptr_dtor(&cpy);
482 break;
483 }
484 }
485 if (!new_purl) {
486 return;
487 }
488 }
489 if (old_url) {
490 switch (Z_TYPE_P(old_url)) {
491 case IS_OBJECT:
492 case IS_ARRAY:
493 old_purl = php_http_url_from_struct(NULL, HASH_OF(old_url) TSRMLS_CC);
494 break;
495 default: {
496 zval *cpy = php_http_zsep(IS_STRING, old_url);
497
498 old_purl = php_url_parse(Z_STRVAL_P(old_url));
499 zval_ptr_dtor(&cpy);
500 break;
501 }
502 }
503 if (!old_purl) {
504 if (new_purl) {
505 php_url_free(new_purl);
506 }
507 return;
508 }
509 }
510
511 php_http_url(flags, old_purl, new_purl, &res_purl, NULL, NULL TSRMLS_CC);
512 php_http_url_to_struct(res_purl, getThis() TSRMLS_CC);
513
514 php_url_free(res_purl);
515 if (old_purl) {
516 php_url_free(old_purl);
517 }
518 if (new_purl) {
519 php_url_free(new_purl);
520 }
521 } end_error_handling();
522 }
523 } end_error_handling();
524 }
525
526 PHP_METHOD(HttpUrl, toString)
527 {
528 if (SUCCESS == zend_parse_parameters_none()) {
529 php_url *purl;
530
531 if ((purl = php_http_url_from_struct(NULL, HASH_OF(getThis()) TSRMLS_CC))) {
532 char *str;
533 size_t len;
534
535 php_http_url(0, purl, NULL, NULL, &str, &len TSRMLS_CC);
536 php_url_free(purl);
537 RETURN_STRINGL(str, len, 0);
538 }
539 }
540 RETURN_EMPTY_STRING();
541 }
542
543 PHP_MINIT_FUNCTION(http_url)
544 {
545 PHP_HTTP_REGISTER_CLASS(http, Url, http_url, php_http_object_class_entry, 0);
546
547 zend_declare_property_null(php_http_url_class_entry, ZEND_STRL("scheme"), ZEND_ACC_PUBLIC TSRMLS_CC);
548 zend_declare_property_null(php_http_url_class_entry, ZEND_STRL("user"), ZEND_ACC_PUBLIC TSRMLS_CC);
549 zend_declare_property_null(php_http_url_class_entry, ZEND_STRL("pass"), ZEND_ACC_PUBLIC TSRMLS_CC);
550 zend_declare_property_null(php_http_url_class_entry, ZEND_STRL("host"), ZEND_ACC_PUBLIC TSRMLS_CC);
551 zend_declare_property_null(php_http_url_class_entry, ZEND_STRL("port"), ZEND_ACC_PUBLIC TSRMLS_CC);
552 zend_declare_property_null(php_http_url_class_entry, ZEND_STRL("path"), ZEND_ACC_PUBLIC TSRMLS_CC);
553 zend_declare_property_null(php_http_url_class_entry, ZEND_STRL("query"), ZEND_ACC_PUBLIC TSRMLS_CC);
554 zend_declare_property_null(php_http_url_class_entry, ZEND_STRL("fragment"), ZEND_ACC_PUBLIC TSRMLS_CC);
555
556 zend_declare_class_constant_long(php_http_url_class_entry, ZEND_STRL("REPLACE"), PHP_HTTP_URL_REPLACE TSRMLS_CC);
557 zend_declare_class_constant_long(php_http_url_class_entry, ZEND_STRL("JOIN_PATH"), PHP_HTTP_URL_JOIN_PATH TSRMLS_CC);
558 zend_declare_class_constant_long(php_http_url_class_entry, ZEND_STRL("JOIN_QUERY"), PHP_HTTP_URL_JOIN_QUERY TSRMLS_CC);
559 zend_declare_class_constant_long(php_http_url_class_entry, ZEND_STRL("STRIP_USER"), PHP_HTTP_URL_STRIP_USER TSRMLS_CC);
560 zend_declare_class_constant_long(php_http_url_class_entry, ZEND_STRL("STRIP_PASS"), PHP_HTTP_URL_STRIP_PASS TSRMLS_CC);
561 zend_declare_class_constant_long(php_http_url_class_entry, ZEND_STRL("STRIP_AUTH"), PHP_HTTP_URL_STRIP_AUTH TSRMLS_CC);
562 zend_declare_class_constant_long(php_http_url_class_entry, ZEND_STRL("STRIP_PORT"), PHP_HTTP_URL_STRIP_PORT TSRMLS_CC);
563 zend_declare_class_constant_long(php_http_url_class_entry, ZEND_STRL("STRIP_PATH"), PHP_HTTP_URL_STRIP_PATH TSRMLS_CC);
564 zend_declare_class_constant_long(php_http_url_class_entry, ZEND_STRL("STRIP_QUERY"), PHP_HTTP_URL_STRIP_QUERY TSRMLS_CC);
565 zend_declare_class_constant_long(php_http_url_class_entry, ZEND_STRL("STRIP_FRAGMENT"), PHP_HTTP_URL_STRIP_FRAGMENT TSRMLS_CC);
566 zend_declare_class_constant_long(php_http_url_class_entry, ZEND_STRL("STRIP_ALL"), PHP_HTTP_URL_STRIP_ALL TSRMLS_CC);
567 zend_declare_class_constant_long(php_http_url_class_entry, ZEND_STRL("FROM_ENV"), PHP_HTTP_URL_FROM_ENV TSRMLS_CC);
568
569 return SUCCESS;
570 }
571
572
573 /*
574 * Local variables:
575 * tab-width: 4
576 * c-basic-offset: 4
577 * End:
578 * vim600: noet sw=4 ts=4 fdm=marker
579 * vim<600: noet sw=4 ts=4
580 */
581