File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change 29
29
*/
30
30
define ('CSAJAX_FILTER_DOMAIN ' , false );
31
31
32
+ /**
33
+ * Enables or disables Expect: 100-continue header. Some webservers don't
34
+ * handle this header correctly.
35
+ * Recommended value: false
36
+ */
37
+ define ('CSAJAX_SUPPRESS_EXPECT ' , false );
38
+
32
39
/**
33
40
* Set debugging to true to receive additional messages - really helpful on development
34
41
*/
137
144
138
145
// let the request begin
139
146
$ ch = curl_init ($ request_url );
147
+
148
+ // Suppress Expect header
149
+ if (CSAJAX_SUPPRESS_EXPECT ) {
150
+ array_push ($ request_headers , 'Expect: ' );
151
+ }
152
+
140
153
curl_setopt ($ ch , CURLOPT_HTTPHEADER , $ request_headers ); // (re-)send headers
141
154
curl_setopt ($ ch , CURLOPT_RETURNTRANSFER , true ); // return response
142
155
curl_setopt ($ ch , CURLOPT_HEADER , true ); // enabled response headers
You can’t perform that action at this time.
0 commit comments