Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 100 lines (88 sloc) 3.546 kb
ebd9e89f » rlerdorf
2000-05-29 Clean up EXIF code and give up on extracting the embedded thumbnail for
1 /*
2 +----------------------------------------------------------------------+
dbeb4158 » andigutmans
2004-01-08 - A belated happy holidays and PHP 5
3 | PHP Version 5 |
ebd9e89f » rlerdorf
2000-05-29 Clean up EXIF code and give up on extracting the embedded thumbnail for
4 +----------------------------------------------------------------------+
a2045ff3 » laruence
2013-01-01 Happy New Year~
5 | Copyright (c) 1997-2013 The PHP Group |
ebd9e89f » rlerdorf
2000-05-29 Clean up EXIF code and give up on extracting the embedded thumbnail for
6 +----------------------------------------------------------------------+
5bd93221 » foobar
2006-01-01 bump year and license version
7 | This source file is subject to version 3.01 of the PHP license, |
ebd9e89f » rlerdorf
2000-05-29 Clean up EXIF code and give up on extracting the embedded thumbnail for
8 | that is bundled with this package in the file LICENSE, and is |
f68c7ff2 » James Cox
2003-06-10 updating license information in the headers.
9 | available through the world-wide-web at the following url: |
5bd93221 » foobar
2006-01-01 bump year and license version
10 | http://www.php.net/license/3_01.txt |
ebd9e89f » rlerdorf
2000-05-29 Clean up EXIF code and give up on extracting the embedded thumbnail for
11 | If you did not receive a copy of the PHP license and are unable to |
12 | obtain it through the world-wide-web, please send a note to |
13 | license@php.net so we can mail you a copy immediately. |
14 +----------------------------------------------------------------------+
90613d22 » Sebastian Bergmann
2002-02-28 Maintain headers.
15 | Author: |
ebd9e89f » rlerdorf
2000-05-29 Clean up EXIF code and give up on extracting the embedded thumbnail for
16 +----------------------------------------------------------------------+
0836e10a » David Croft
2000-07-24 various version 2.0 and 2.01 licenses -> 2.02
17 */
18
19 /* $Id$ */
20
13e67642 » zsuraski
1999-09-16 Generalize SAPI a bit
21 #include "php.h"
22 #include "SAPI.h"
23 #include "rfc1867.h"
24
d9a86285 » Sascha Schumann
1999-12-05 Fix some warnings
25 #include "php_content_types.h"
26
81e2cf03 » rlerdorf
2001-06-06 Fix folding and clean up some extensions
27 /* {{{ php_post_entries[]
28 */
a6393de6 » zsuraski
2000-02-17 Make POST handling the way it should be. RFC1867, and any future POST…
29 static sapi_post_entry php_post_entries[] = {
e46decaa » foobar
2001-09-03 First step for chunkifying the HTTP uploads.
30 { DEFAULT_POST_CONTENT_TYPE, sizeof(DEFAULT_POST_CONTENT_TYPE)-1, sapi_read_standard_form_data, php_std_post_handler },
31 { MULTIPART_CONTENT_TYPE, sizeof(MULTIPART_CONTENT_TYPE)-1, NULL, rfc1867_post_handler },
32 { NULL, 0, NULL, NULL }
98d95dd8 » zsuraski
1999-09-16 - Added support for unknown POST content types (Zeev)
33 };
81e2cf03 » rlerdorf
2001-06-06 Fix folding and clean up some extensions
34 /* }}} */
98d95dd8 » zsuraski
1999-09-16 - Added support for unknown POST content types (Zeev)
35
81e2cf03 » rlerdorf
2001-06-06 Fix folding and clean up some extensions
36 /* {{{ SAPI_POST_READER_FUNC
37 */
0dab84d0 » Daniel Beulshausen
2001-08-15 fix SAPI_POST_* exports
38 SAPI_API SAPI_POST_READER_FUNC(php_default_post_reader)
98d95dd8 » zsuraski
1999-09-16 - Added support for unknown POST content types (Zeev)
39 {
f932fe5a » Ilia Alshanetsky
2007-05-06 Fixed bug #41293 (Fixed creation of HTTP_RAW_POST_DATA when there is no
40 char *data;
41 int length;
98d95dd8 » zsuraski
1999-09-16 - Added support for unknown POST content types (Zeev)
42
7f48a6f1 » foobar
2002-11-29 MFB
43 /* $HTTP_RAW_POST_DATA registration */
f932fe5a » Ilia Alshanetsky
2007-05-06 Fixed bug #41293 (Fixed creation of HTTP_RAW_POST_DATA when there is no
44 if (!strcmp(SG(request_info).request_method, "POST")) {
45 if (NULL == SG(request_info).post_entry) {
be5e379e » Hartmut Holzgraefe
2002-11-12 HTTP_RAW_POST_DATA BC fixes
46 /* no post handler registered, so we just swallow the data */
47 sapi_read_standard_form_data(TSRMLS_C);
f932fe5a » Ilia Alshanetsky
2007-05-06 Fixed bug #41293 (Fixed creation of HTTP_RAW_POST_DATA when there is no
48 }
49
420352d8 » Ilia Alshanetsky
2007-05-07 Register RAW_POST_DATA even when always_populate_raw_post_data is off in
50 /* For unknown content types we create HTTP_RAW_POST_DATA even if always_populate_raw_post_data off,
51 * this is in-effecient, but we need to keep doing it for BC reasons (for now) */
52 if ((PG(always_populate_raw_post_data) || NULL == SG(request_info).post_entry) && SG(request_info).post_data) {
be5e379e » Hartmut Holzgraefe
2002-11-12 HTTP_RAW_POST_DATA BC fixes
53 length = SG(request_info).post_data_length;
54 data = estrndup(SG(request_info).post_data, length);
55 SET_VAR_STRINGL("HTTP_RAW_POST_DATA", data, length);
5aec6f4e » Hartmut Holzgraefe
2002-11-08 fix for #20198:
56 }
8b7e9d77 » Hartmut Holzgraefe
2002-10-21 some changes to how request input data (Content-Lenght >0) is handled
57 }
be5e379e » Hartmut Holzgraefe
2002-11-12 HTTP_RAW_POST_DATA BC fixes
58
59 /* for php://input stream:
60 some post handlers modify the content of request_info.post_data
61 so for now we need a copy for the php://input stream
62 in the long run post handlers should be changed to not touch
63 request_info.post_data for memory preservation reasons
64 */
f932fe5a » Ilia Alshanetsky
2007-05-06 Fixed bug #41293 (Fixed creation of HTTP_RAW_POST_DATA when there is no
65 if (SG(request_info).post_data) {
be5e379e » Hartmut Holzgraefe
2002-11-12 HTTP_RAW_POST_DATA BC fixes
66 SG(request_info).raw_post_data = estrndup(SG(request_info).post_data, SG(request_info).post_data_length);
67 SG(request_info).raw_post_data_length = SG(request_info).post_data_length;
68 }
13e67642 » zsuraski
1999-09-16 Generalize SAPI a bit
69 }
81e2cf03 » rlerdorf
2001-06-06 Fix folding and clean up some extensions
70 /* }}} */
13e67642 » zsuraski
1999-09-16 Generalize SAPI a bit
71
81e2cf03 » rlerdorf
2001-06-06 Fix folding and clean up some extensions
72 /* {{{ php_startup_sapi_content_types
73 */
0d784538 » Moriyoshi Koizumi
2005-02-21 - Fix bug #28568 (known_post_content_types is not thread safe).
74 int php_startup_sapi_content_types(TSRMLS_D)
13e67642 » zsuraski
1999-09-16 Generalize SAPI a bit
75 {
98d95dd8 » zsuraski
1999-09-16 - Added support for unknown POST content types (Zeev)
76 sapi_register_default_post_reader(php_default_post_reader);
7527bf0c » Rui Hirokawa
2002-08-02 made sapi_register_treat_data() to support multibyte input encoding t…
77 sapi_register_treat_data(php_default_treat_data);
94b7a007 » smalyshev
2009-04-28 fix for #47930
78 sapi_register_input_filter(php_default_input_filter, NULL);
13e67642 » zsuraski
1999-09-16 Generalize SAPI a bit
79 return SUCCESS;
80 }
81e2cf03 » rlerdorf
2001-06-06 Fix folding and clean up some extensions
81 /* }}} */
ebd9e89f » rlerdorf
2000-05-29 Clean up EXIF code and give up on extracting the embedded thumbnail for
82
5e33c04e » Moriyoshi Koizumi
2005-03-05 - Fixed bug #32109 ($_POST is not populated in multithreaded environm…
83 /* {{{ php_setup_sapi_content_types
84 */
85 int php_setup_sapi_content_types(TSRMLS_D)
86 {
87 sapi_register_post_entries(php_post_entries TSRMLS_CC);
88
89 return SUCCESS;
90 }
91 /* }}} */
92
ebd9e89f » rlerdorf
2000-05-29 Clean up EXIF code and give up on extracting the embedded thumbnail for
93 /*
94 * Local variables:
95 * tab-width: 4
96 * c-basic-offset: 4
97 * End:
78747bd2 » Derick Rethans
2001-09-09 - Don't wrap lines... this is annoying while coding.
98 * vim600: sw=4 ts=4 fdm=marker
99 * vim<600: sw=4 ts=4
ebd9e89f » rlerdorf
2000-05-29 Clean up EXIF code and give up on extracting the embedded thumbnail for
100 */
Something went wrong with that request. Please try again.