File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -209,7 +209,6 @@ static int sapi_apache_header_handler(sapi_header_struct *sapi_header, sapi_head
209
209
static int sapi_apache_send_headers (sapi_headers_struct * sapi_headers TSRMLS_DC )
210
210
{
211
211
request_rec * r = SG (server_context );
212
- char * status_buf = NULL ;
213
212
const char * sline = SG (sapi_headers ).http_status_line ;
214
213
int sline_len ;
215
214
@@ -223,21 +222,17 @@ static int sapi_apache_send_headers(sapi_headers_struct *sapi_headers TSRMLS_DC)
223
222
* the status-code: */
224
223
if (sline && ((sline_len = strlen (sline )) > 12 ) && strncmp (sline , "HTTP/1." , 7 ) == 0 && sline [8 ] == ' ' && sline [12 ] == ' ' ) {
225
224
if ((sline_len - 9 ) > MAX_STATUS_LENGTH ) {
226
- status_buf = estrndup ( sline + 9 , MAX_STATUS_LENGTH );
225
+ r -> status_line = ap_pstrndup ( r -> pool , sline + 9 , MAX_STATUS_LENGTH );
227
226
} else {
228
- status_buf = estrndup ( sline + 9 , sline_len - 9 );
227
+ r -> status_line = ap_pstrndup ( r -> pool , sline + 9 , sline_len - 9 );
229
228
}
230
- r -> status_line = status_buf ;
231
229
}
232
230
233
231
if (r -> status == 304 ) {
234
232
send_error_response (r ,0 );
235
233
} else {
236
234
send_http_header (r );
237
235
}
238
- if (status_buf ) {
239
- efree (status_buf );
240
- }
241
236
return SAPI_HEADER_SENT_SUCCESSFULLY ;
242
237
}
243
238
/* }}} */
You can’t perform that action at this time.
0 commit comments