httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randy Terbush <ra...@zyzzyva.com>
Subject Re: [PATCH] mod_dir HTTP_NOT_ACCEPTABLE fixup
Date Mon, 12 May 1997 14:02:28 GMT

+1


> The following is identical to 
> 
>   * Petr's [PATCH] mod_dir HTTP_NOT_ACCEPTABLE fixup
>     <199704301848.UAA13894@boco.fee.vutbr.cz>
>     Status: +1 Petr, Dean
>     Roy notes that a general solution is required as this one does not
>     handle all cases.
> 
> except that it doesn't respond with HTTP_NOT_ACCEPTABLE unless there are
> no more DirectoryIndex names to check.
> 
> ....Roy
> 
> Index: mod_dir.c
> ===================================================================
> RCS file: /export/home/cvs/apache/src/mod_dir.c,v
> retrieving revision 1.25
> diff -c -r1.25 mod_dir.c
> *** mod_dir.c	1997/04/18 02:56:14	1.25
> --- mod_dir.c	1997/05/12 03:08:52
> ***************
> *** 807,813 ****
>   	char *name_ptr = getword_conf (r->pool, &names_ptr);
>   	request_rec *rr = sub_req_lookup_uri (name_ptr, r);
>              
> ! 	if (rr->status == 200 && rr->finfo.st_mode != 0) {
>   	    char* new_uri = escape_uri(r->pool, rr->uri);
>   
>   	    if (rr->args != NULL)
> --- 807,813 ----
>   	char *name_ptr = getword_conf (r->pool, &names_ptr);
>   	request_rec *rr = sub_req_lookup_uri (name_ptr, r);
>              
> ! 	if (rr->status == HTTP_OK && rr->finfo.st_mode != 0) {
>   	    char* new_uri = escape_uri(r->pool, rr->uri);
>   
>   	    if (rr->args != NULL)
> ***************
> *** 822,828 ****
>   
>   	/* If the request returned a redirect, propagate it to the client */
>   
> ! 	if (is_HTTP_REDIRECT(rr->status)) {
>   	    error_notfound = rr->status;
>   	    r->notes = overlay_tables(r->pool, r->notes, rr->notes);
>   	    r->headers_out = overlay_tables(r->pool, r->headers_out,
> --- 822,830 ----
>   
>   	/* If the request returned a redirect, propagate it to the client */
>   
> ! 	if (is_HTTP_REDIRECT(rr->status) ||
> ! 	    (rr->status == HTTP_NOT_ACCEPTABLE && *names_ptr == '\0')) {
> ! 
>   	    error_notfound = rr->status;
>   	    r->notes = overlay_tables(r->pool, r->notes, rr->notes);
>   	    r->headers_out = overlay_tables(r->pool, r->headers_out,
> ***************
> *** 842,848 ****
>   	 * exist, we return the last error response we got, instead
>   	 * of a directory listing.
>   	 */
> ! 	if (rr->status && rr->status != 404 && rr->status != 200)
>   	    error_notfound = rr->status;
>   
>           destroy_sub_req (rr);
> --- 844,850 ----
>   	 * exist, we return the last error response we got, instead
>   	 * of a directory listing.
>   	 */
> ! 	if (rr->status && rr->status != HTTP_NOT_FOUND && rr->status
!= HTTP_OK)
>   	    error_notfound = rr->status;
>   
>           destroy_sub_req (rr);




Mime
View raw message