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 2929 */
3030define ('CSAJAX_FILTER_DOMAIN ' , false );
3131
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+
3239/**
3340 * Set debugging to true to receive additional messages - really helpful on development
3441 */
137144
138145// let the request begin
139146$ ch = curl_init ($ request_url );
147+
148+ // Suppress Expect header
149+ if (CSAJAX_SUPPRESS_EXPECT ) {
150+ array_push ($ request_headers , 'Expect: ' );
151+ }
152+
140153curl_setopt ($ ch , CURLOPT_HTTPHEADER , $ request_headers ); // (re-)send headers
141154curl_setopt ($ ch , CURLOPT_RETURNTRANSFER , true ); // return response
142155curl_setopt ($ ch , CURLOPT_HEADER , true ); // enabled response headers
You can’t perform that action at this time.
0 commit comments