You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Raymond S Brand <rs...@rsbx.net> on 1999/05/04 22:53:20 UTC

[PATCH] ReadmeName and HeaderName files server-parsed and content negotiated.

I've brought my patches up to date as of an 19990504_1525EDT rsync and improved the
cooperation between mod_include and mod_autoindex. Anyone willing to commit these?

This message has two attached patches that allow for HeaderName and ReadmeName files
used by mod_autoindex to be server-parsed and/or content negotiated.

Differences from 1.3.6:
	Filenames specified by the ReadmeName and HeaderName directives really are
	relative now. Before they could not contain a "/". This makes site wide headers
	and footers much easier to do.

	No longer tacks ".html" to then end of names to find HTML versions of the content.
	Use MultiViews instead.

	No longer assumes that the base name refers to plain content.

	An <H R> now always follows the directory listing if it's a fancy index.

	The server signature is only generated (if enabled) if a ReadmeName file was
	not output.

	Some miscellaneous situations where the pre and post `ambles' were not being
	generated correctly are also corrected.

PR#s affected:
	1574, 3026, 3529, 3569, 4256
	An earlier, incomplete, version of this patch is included in PR#4256

Notes:
	The first patch, "parsed-autoindex.diff.txt", has edits to the CHANGES file,
	mod_autoindex.c, and the mod_autoindex manual document.

	The second patch, "parsed-autoindex-env.diff.txt", has edits to mod_autoindex.c
	and mod_include.c to have the sub_request environment variables reflect the
	directory, not the HeaderName or ReadmeName file, if the HeaderName and/or
	ReadmeName files are server-parsed. Without this patch, some of the environment
	variables, as displayed by mod_include's #printenv, will reflect the HeaderName
	or ReadmeName file, not the directory.

Raymond S Brand

Re: [PATCH] ReadmeName and HeaderName files server-parsed and content negotiated.

Posted by Raymond S Brand <rs...@rsbx.net>.
Rodent of Unusual Size wrote:
> I've been meaning to test this, and finally got to it a bit to-day.
> Unfortunately, it's not quite there yet -- it doesn't handle non-text/*
> content-types correctly.  If the HeaderName gets multiviewed to
> HEADER.gif, the binary gets included in the response.
> 
> I'm halfway through a fix; I'll post it after lunch.

I ran into that problem too; discovered mod_include handles it just as
bad; saw no obvious solution; decided to to take the easy way out and
be consistent with mod_include.

Raymond S Brand

Re: [PATCH] ReadmeName and HeaderName files server-parsed and content negotiated.

Posted by Rodent of Unusual Size <Ke...@Golux.Com>.
Raymond S Brand wrote:
> 
> OK, it's been a week since I submitted the patches to the list and there
> have been NO comments. Has anybody looked at them? I really would like
> server-parsed readme and header file capability to make it into the next
> release.

I've been meaning to test this, and finally got to it a bit to-day.
Unfortunately, it's not quite there yet -- it doesn't handle non-text/*
content-types correctly.  If the HeaderName gets multiviewed to
HEADER.gif, the binary gets included in the response.

I'm halfway through a fix; I'll post it after lunch.
-- 
#ken    P-)}

Ken Coar                    <http://Web.Golux.Com/coar/>
Apache Software Foundation  <http://www.apache.org/>
"Apache Server for Dummies" <http://Web.Golux.Com/coar/ASFD/>

Re: [PATCH] ReadmeName and HeaderName files server-parsed and content negotiated.

Posted by Raymond S Brand <rs...@rsbx.net>.
OK, it's been a week since I submitted the patches to the list and there
have been NO comments. Has anybody looked at them? I really would like
server-parsed readme and header file capability to make it into the next
release.

Raymond S Brand

Re: [PATCH] ReadmeName and HeaderName files server-parsed and content negotiated.

Posted by Raymond S Brand <rs...@rsbx.net>.
Dean Gaudet wrote:
>
...

> Could you reformat following the style guide?
> http://dev.apache.org/styleguide.html

I though I had. I'll recheck, but what did I miss?

...
> 
> Could you add a note to the docs indicating that as of 1.3.7 the *Name
> directives take a uri-path (or whatever the right name is for the portion
> of the URI following the protocl://host part) ?

OK, but somebody needs to tell me what the proper name is.
> 
> Thanks
> Dean

Re: [PATCH] ReadmeName and HeaderName files server-parsed and content negotiated.

Posted by Raymond S Brand <rs...@rsbx.net>.
Dean Gaudet wrote:

> Could you reformat following the style guide?
> http://dev.apache.org/styleguide.html

Oops! I didn't get the formatting anywhere close to correct.

The following 2 "style" patches should correct the situation.

Raymond S Brand

Re: [PATCH] ReadmeName and HeaderName files server-parsed and content negotiated.

Posted by Dean Gaudet <dg...@arctic.org>.

On Tue, 4 May 1999, Raymond S Brand wrote:

> I've brought my patches up to date as of an 19990504_1525EDT rsync and improved the
> cooperation between mod_include and mod_autoindex. Anyone willing to commit these?

Could you reformat following the style guide?
http://dev.apache.org/styleguide.html

> 	Filenames specified by the ReadmeName and HeaderName directives really are
> 	relative now. Before they could not contain a "/". This makes site wide headers
> 	and footers much easier to do.

Could you add a note to the docs indicating that as of 1.3.7 the *Name
directives take a uri-path (or whatever the right name is for the portion
of the URI following the protocl://host part) ?

Thanks
Dean

Re: [PATCH] ReadmeName and HeaderName files server-parsed and content negotiated.

Posted by Raymond S Brand <rs...@rsbx.net>.
Dean Gaudet wrote:
> 
> Raymond, you've got stuff like this in your patch:
> 
> +    if (emit_H1)    { ap_rvputs(r, "<H1>Index of ", title, "</H1>\n", NULL); }
> +
> +    if (rr)         { ap_destroy_sub_req(rr); }
> 
> which isn't in the apache style...
> 
> Could you submit a single patch which includes your changes in the right
> style?  (Rather than two patches which I have to apply.)  sorry to be
> picky, but it's just easier for me.
> 
> Dean

I left those like that because it made the code clearer, IMHO. But, I'll
reformat and produce an integrated patch this afternoon.

Raymond S Brand

Re: [PATCH] ReadmeName and HeaderName files server-parsed and content negotiated.

Posted by Dean Gaudet <dg...@arctic.org>.
Raymond, you've got stuff like this in your patch:

+    if (emit_H1)    { ap_rvputs(r, "<H1>Index of ", title, "</H1>\n", NULL); }
+
+    if (rr)         { ap_destroy_sub_req(rr); }

which isn't in the apache style...

Could you submit a single patch which includes your changes in the right
style?  (Rather than two patches which I have to apply.)  sorry to be
picky, but it's just easier for me.

Dean