API_EXPORT(int) ap_find_path_info(const char *uri, const char *path_info);
API_EXPORT(void) ap_add_cgi_vars(request_rec *r);
API_EXPORT(void) ap_add_common_vars(request_rec *r);
-API_EXPORT(int) ap_scan_script_header_err(request_rec *r, FILE *f, char *buffer);
+API_EXPORT(int) ap_scan_script_header_err(request_rec *r, ap_file_t *f, char *buffer);
API_EXPORT(int) ap_scan_script_header_err_buff(request_rec *r, BUFF *f,
char *buffer);
API_EXPORT(int) ap_scan_script_header_err_core(request_rec *r, char *buffer,
ap_file_t *f;
ap_status_t status;
const char *location;
- FILE *thefile; /* XXX leave these alone until we convert */
- int thefd; /* everything to use apr_file_t's. */
r->allowed |= (1 << M_GET);
if (r->method_number != M_GET)
return FORBIDDEN;
}
- ap_get_os_file(&thefd, f);
- thefile = fdopen(thefd, "r");
-
- ap_scan_script_header_err(r, thefile, NULL);
+ ap_scan_script_header_err(r, f, NULL);
location = ap_table_get(r->headers_out, "Location");
if (location && location[0] == '/' &&
ap_send_http_header(r);
if (!r->header_only) {
- ap_off_t zero = 0;
- ap_seek(f, APR_CUR, &zero);
ap_send_fd(f, r);
}
static int getsfunc_FILE(char *buf, int len, void *f)
{
- return fgets(buf, len, (FILE *) f) != NULL;
+ return ap_fgets(buf, len, (ap_file_t *) f) == APR_SUCCESS;
}
-API_EXPORT(int) ap_scan_script_header_err(request_rec *r, FILE *f,
+API_EXPORT(int) ap_scan_script_header_err(request_rec *r, ap_file_t *f,
char *buffer)
{
return ap_scan_script_header_err_core(r, buffer, getsfunc_FILE, f);