You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by imacat <im...@mail.imacat.idv.tw> on 2002/12/25 17:52:10 UTC

[users@httpd] Content Negotiation with in Apache 2.0.43

Dear all,

    I believe I did not found anything related to this problem.  Maybe I
have missed something somewhere.

    I cannot do content negotiation with <DirectoryMatch> in Apache
2.0.43.  My testing httpd.conf is:

imacat@rinse ~ % cat /etc/apache/httpd2.conf-test
User nobody
Group nogroup
DocumentRoot /var/tmp/htdocs
PidFile /var/run/httpd2.pid
Listen 50080
ErrorLog /var/log/apache/error_log
Options +MultiViews
DirectoryIndex index.html

AddLanguage en          .en
AddLanguage zh-tw       .zh-tw
AddLanguage zh-cn       .zh-cn
LanguagePriority zh-tw zh-cn en

<DirectoryMatch /var/tmp/htdocs>
</DirectoryMatch>
imacat@rinse ~ % 

    My document root is:

imacat@rinse ~ % ls /var/tmp/htdocs -l
total 12
-rw-r--r--    1 imacat   root          517 Dec 25 23:34 index.html.en
lrwxrwxrwx    1 imacat   root           13 Dec 25 23:36 index.html.html -> index.html.en
-rw-r--r--    1 imacat   root          504 Dec 25 23:35 index.html.zh-cn
-rw-r--r--    1 imacat   root          500 Dec 25 23:35 index.html.zh-tw
imacat@rinse ~ % 

    My httpd is:

imacat@rinse ~ % /usr/sbin/httpd2 -l
Compiled in modules:
  core.c
  worker.c
  http_core.c
  mod_mime.c
  mod_autoindex.c
  mod_negotiation.c
  mod_dir.c
imacat@rinse ~ % 

    After starting /usr/sbin/httpd2 -f /etc/apache/httpd2.conf-test, and
try to connect, I get:

imacat@rinse ~ % lynx -dump http://rinse:50080/
                                  Index of /

     * [1]index.html.en
     * [2]index.html.html
     * [3]index.html.zh-cn
     * [4]index.html.zh-tw

References

   1. http://rinse:50080/index.html.en
   2. http://rinse:50080/index.html.html
   3. http://rinse:50080/index.html.zh-cn
   4. http://rinse:50080/index.html.zh-tw
imacat@rinse ~ %

    This is strange.  It should display index.html.html.  And if I
comment out <DirectoryMatch>:

imacat@rinse ~ % cat /etc/apache/httpd2.conf-test
User nobody
Group nogroup
DocumentRoot /var/tmp/htdocs
PidFile /var/run/httpd2.pid
Listen 50080
ErrorLog /var/log/apache/error_log
Options +MultiViews
DirectoryIndex index.html

AddLanguage en          .en
AddLanguage zh-tw       .zh-tw
AddLanguage zh-cn       .zh-cn
LanguagePriority zh-tw zh-cn en

#<DirectoryMatch /var/tmp/htdocs>
#</DirectoryMatch>
imacat@rinse ~ % 

    And try again, I'll get:

imacat@rinse ~ % lynx -dump http://rinse:50080/
                                   Test Page

   This is a test page.
imacat@rinse ~ % 

    which is the correct answer.

    This had never happened before in Apache 1.3.x (at least in my
experience).  I'm using content negotiation throughout my website, along
with several <DirectoryMatch>.  I cannot switch to Apache 2 now for this
reason.  This does not happen on <Directory> or <LocationMatch>.  It
only seems to be a problem of <DirectoryMatch>

    I don't know if anyone has noticed this, or if I have missed
something in the Apache 2 documentation.  I have tried some search on
the mailing list archives, but found nothing.  Can anyone give me a hint
on this?  Or is it really a bug?

    Any help would be greatly appreciated.  Please tell me whoever needs
more infomation on this.

--
Best regards,
imacat ^_*'
imacat@mail.imacat.idv.tw
PGP Key: http://www.imacat.idv.tw/me/pgpkey.txt

<<Woman's Voice>> News: http://www.wov.idv.tw/
Tavern IMACAT's: http://www.imacat.idv.tw/
TLUG List Manager: http://www.linux.org.tw/mailman/listinfo/tlug

Re: [users@httpd] Content Negotiation with in Apache 2.0.43

Posted by imacat <im...@mail.imacat.idv.tw>.
Dear all,

    Sorry I forgot 2 things here.  (I'm a little dizzy recently.)

>     After starting /usr/sbin/httpd2 -f /etc/apache/httpd2.conf-test, and
> try to connect, I get:
> 
> imacat@rinse ~ % lynx -dump http://rinse:50080/
>                                   Index of /
> 
>      * [1]index.html.en
>      * [2]index.html.html
>      * [3]index.html.zh-cn
>      * [4]index.html.zh-tw
> 
> References
> 
>    1. http://rinse:50080/index.html.en
>    2. http://rinse:50080/index.html.html
>    3. http://rinse:50080/index.html.zh-cn
>    4. http://rinse:50080/index.html.zh-tw
> imacat@rinse ~ %
> 
>     This is strange.  It should display index.html.html.

    But it is OK if I request index.html directly.  It seems to be
mod_dir related.

imacat@rinse ~ % lynx -dump http://rinse:50080/index.html
                            Test Page index.html.en

   This is test page index.html.en.
imacat@rinse ~ % 

    It is OK, too, if I have an index.html there.  It seems to be
mod_negotiation related, too.

imacat@rinse ~ % ln -s index.html.en /var/tmp/htdocs/index.html
imacat@rinse ~ % lynx -dump http://rinse:50080/
                            Test Page index.html.en

   This is test page index.html.en.
imacat@rinse ~ % 

>     And if I comment out <DirectoryMatch>:
> 
> imacat@rinse ~ % cat /etc/apache/httpd2.conf-test
> User nobody
> Group nogroup
> DocumentRoot /var/tmp/htdocs
> PidFile /var/run/httpd2.pid
> Listen 50080
> ErrorLog /var/log/apache/error_log
> Options +MultiViews
> DirectoryIndex index.html
> 
> AddLanguage en          .en
> AddLanguage zh-tw       .zh-tw
> AddLanguage zh-cn       .zh-cn
> LanguagePriority zh-tw zh-cn en
> 
> #<DirectoryMatch /var/tmp/htdocs>
> #</DirectoryMatch>
> imacat@rinse ~ % 
> 
>     And try again, I'll get:
> 
> imacat@rinse ~ % lynx -dump http://rinse:50080/
>                             Test Page index.html.en
> 
>    This is test page index.html.en.
> imacat@rinse ~ % 
> 
>     which is the correct answer.

    And there's nothing left in the error_log.  Not even if I turn on:

LogLevel debug

    mod_negotiation does not seem to be working with mod_dir, if it is
somewhere under <DirectoryMatch>.  But they both have no problem solely.

--
Best regards,
imacat ^_*'
imacat@mail.imacat.idv.tw
PGP Key: http://www.imacat.idv.tw/me/pgpkey.txt

<<Woman's Voice>> News: http://www.wov.idv.tw/
Tavern IMACAT's: http://www.imacat.idv.tw/
TLUG List Manager: http://www.linux.org.tw/mailman/listinfo/tlug

Re: [users@httpd] Content Negotiation with in Apache 2.0.43

Posted by Aaron Sturm <aa...@hotmail.com>.
How about you don't waste your time replying to e-mails if you think they're
a waste of time.

I have a hotmail account. I doubt those other clients can connect and get my
e-mail.

-Aaron

----- Original Message -----
From: "imacat" <im...@mail.imacat.idv.tw>
To: "Apache Users" <us...@httpd.apache.org>
Sent: Thursday, December 26, 2002 5:45 PM
Subject: Re: [users@httpd] Content Negotiation with <DirectoryMatch> in
Apache 2.0.43


> Dear Aaron,
>
> > I keep getting attachments that I'm not willing to open... anyone else
> > getting this?
>
>     Ya, me.  Can you use something else smarter than Microsoft Outlook
> Express that can read PGP/SMIME-signed mails normally?  (For ex, Mozilla
> mail or Becky!)  This is the first time on this kind of list that
> someone complaints about this.  I'm surprised.  Though I'm new to this
> Apache Users' list, I thought many people on software lists use
> PGP/SMIME-signed mails, since this is easily seen in all kinds of
> mailing list archives.  Even Apache distribution itself uses PGP
> signatures.  Am I wrong?
>
>     Don't waste people's time on such a question like this.
>
> --
> Best regards,
> imacat ^_*'
> imacat@mail.imacat.idv.tw
> PGP Key: http://www.imacat.idv.tw/me/pgpkey.txt
>
> <<Woman's Voice>> News: http://www.wov.idv.tw/
> Tavern IMACAT's: http://www.imacat.idv.tw/
> TLUG List Manager: http://www.linux.org.tw/mailman/listinfo/tlug
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Content Negotiation with in Apache 2.0.43

Posted by imacat <im...@mail.imacat.idv.tw>.
On Fri, 27 Dec 2002 01:50:28 -0000
"Chris Taylor" <ch...@x-bb.org> wrote:
> I use PGP signed mail, and Outlook Express. :)

    Of course.  You use PGP, without S/MIME.  You only signed the mail
body, but not the whole mail.  PGPfreeware Outlook Express plug-in can
only sign the mail body.  It cannot use S/MIME sign the whole mail.  But
I sign the whole mail, including the attachments such as debug logs,
sample configuration files or patches I wrote (which, like software
distribution, needs signature).  It's not fully functional if you can
only sign the mail body.

> And it's just polite to send standard plain text IMHO....

    PGP/SMIME mail is standard (RFC 2015, also, OpenPGP RFC 2440).  It's
definitly plain text.  It's Microsoft Outlook Express (or, also, Hotmail)
that is not standard compliant.  Outlook Express can deal with S/MIME
mails signed with X.509 keys, but not S/MIME mails signed with PGP keys.
If you receive a S/MIME mail signed with X.509 keys in Outlook Express,
it display the signed mail in plain text.  You will never question if it
is standard plain text or not.  :)

On Fri, 27 Dec 2002 18:34:15 +1100
Zac Stevens <zt...@cryptocracy.com> wrote:
> FWIW, I really don't see the point in signing messages to lists such as
> these.  After all, the signature verifies the integrity of the message and
> the identity of the sender - neither of which is particular important in
> this context.

    At least one.  It helps to keep a good habit of signing things
(words, mails, distributions, patches) that you do, and helps to keep
yourself be responsible to what you wrote.  :)

On Thu, 26 Dec 2002 17:48:09 -0800
"Aaron Sturm" <aa...@hotmail.com> wrote:
> How about you don't waste your time replying to e-mails if you think they're
> a waste of time.

    I'll tell you what is a waste of time.  It's not my fault to send
RFC-2015/2440 S/MIME standard-conforming PGP signed mails.  It's
Microsoft's fault to be not standard-compliant.  But I'll have to take
time to explain how Microsoft processes mails here, un-paid, again and
again, just to comfort those that fear the result of Microsoft's
stupidity.  I've even been refused by some customer service department
just for the same reason, "unknown attachment", even I was a paid
customer.

    Right now I don't care a bit about this PGP stuff.  The subject of
this mail is "Content Negotiation with <DirectoryMatch> in Apache 2.0.43".
I spent 2 whole nights debugging, doing experiments, logging results,
searching internet, writing proper mail reports, just to make clear this
problem to my best extend.  I concern about whether this problem of
mod_dir, mod_negotiation and <DirectoryMatch> can be fixed.  But now I
have to explain this PGP thing, comforting those that fears for 2 days,
doing the same thing I have done many, many times in the past, just to
see if anyone knows this problem for 3-4 days.

    It's a waste of time.  I should report this as a bug directly and
ignore the bug-reporting suggestion written on the Apache website.

--
Best regards,
imacat ^_*'
imacat@mail.imacat.idv.tw
PGP Key: http://www.imacat.idv.tw/me/pgpkey.txt

<<Woman's Voice>> News: http://www.wov.idv.tw/
Tavern IMACAT's: http://www.imacat.idv.tw/
TLUG List Manager: http://www.linux.org.tw/mailman/listinfo/tlug

Re: [users@httpd] Content Negotiation with in Apache 2.0.43

Posted by Zac Stevens <zt...@cryptocracy.com>.
On Fri, Dec 27, 2002 at 01:50:28AM -0000, Chris Taylor wrote:
> And it's just polite to send standard plain text IMHO....

That's precisely what the OP was sending - granted, it was a multi-part
MIME message but I'd hope it was safe to assume that everyone is using
MIME-compliant mailers these days.  Attachments are not - and never have
been - inherently evil.

FWIW, I really don't see the point in signing messages to lists such as
these.  After all, the signature verifies the integrity of the message and
the identity of the sender - neither of which is particular important in
this context.

Signing files is another matter entirely - this is important to allow users
to verify that the binaries (or source!) have not been tampered with.

My 2c, add tax where appropriate


Zac

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Content Negotiation with in Apache 2.0.43

Posted by Chris Taylor <ch...@x-bb.org>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I use PGP signed mail, and Outlook Express. :)

And it's just polite to send standard plain text IMHO....

Chris Taylor - chris@x-bb.org - The guy with the PS2 WebServer -
http://www.x-bb.org/chris.asc

- ----- Original Message ----- 
From: "imacat" <im...@mail.imacat.idv.tw>
To: "Apache Users" <us...@httpd.apache.org>
Sent: Friday, December 27, 2002 1:45 AM
Subject: Re: [users@httpd] Content Negotiation with <DirectoryMatch>
in Apache 2.0.43


> Dear Aaron,
> 
> > I keep getting attachments that I'm not willing to open... anyone
> > else getting this?
> 
>     Ya, me.  Can you use something else smarter than Microsoft
> Outlook Express that can read PGP/SMIME-signed mails normally? 
> (For ex, Mozilla mail or Becky!)  This is the first time on this
> kind of list that
> someone complaints about this.  I'm surprised.  Though I'm new to
> this Apache Users' list, I thought many people on software lists
> use
> PGP/SMIME-signed mails, since this is easily seen in all kinds of
> mailing list archives.  Even Apache distribution itself uses PGP
> signatures.  Am I wrong?
> 
>     Don't waste people's time on such a question like this.
> 
> --
> Best regards,
> imacat ^_*'
> imacat@mail.imacat.idv.tw
> PGP Key: http://www.imacat.idv.tw/me/pgpkey.txt
> 
> <<Woman's Voice>> News: http://www.wov.idv.tw/
> Tavern IMACAT's: http://www.imacat.idv.tw/
> TLUG List Manager: http://www.linux.org.tw/mailman/listinfo/tlug
> 
> 
> --------------------------------------------------------------------
> - The official User-To-User support forum of the Apache HTTP Server
> Project. See <URL:http://httpd.apache.org/userslist.html> for more
> info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>

iQA/AwUBPgux4Sqf8lmE2RZkEQLh5QCfZtRMjvKg8E2naHbrtTMeWGTGlW0An12u
SVb4uEsB7sxg0KtgzjuYjgmu
=m0pn
-----END PGP SIGNATURE-----



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Content Negotiation with in Apache 2.0.43

Posted by imacat <im...@mail.imacat.idv.tw>.
Dear Aaron,

> I keep getting attachments that I'm not willing to open... anyone else
> getting this?

    Ya, me.  Can you use something else smarter than Microsoft Outlook
Express that can read PGP/SMIME-signed mails normally?  (For ex, Mozilla
mail or Becky!)  This is the first time on this kind of list that
someone complaints about this.  I'm surprised.  Though I'm new to this
Apache Users' list, I thought many people on software lists use
PGP/SMIME-signed mails, since this is easily seen in all kinds of
mailing list archives.  Even Apache distribution itself uses PGP
signatures.  Am I wrong?

    Don't waste people's time on such a question like this.

--
Best regards,
imacat ^_*'
imacat@mail.imacat.idv.tw
PGP Key: http://www.imacat.idv.tw/me/pgpkey.txt

<<Woman's Voice>> News: http://www.wov.idv.tw/
Tavern IMACAT's: http://www.imacat.idv.tw/
TLUG List Manager: http://www.linux.org.tw/mailman/listinfo/tlug


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Content Negotiation with in Apache 2.0.43

Posted by Aaron Sturm <aa...@hotmail.com>.
figured... but didn't want to take any risks.

----- Original Message -----
From: "Chris Taylor" <ch...@x-bb.org>
To: <us...@httpd.apache.org>
Sent: Thursday, December 26, 2002 5:38 PM
Subject: Re: [users@httpd] Content Negotiation with <DirectoryMatch> in
Apache 2.0.43


> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Yes, it's Imacat's mail client I'm guessing....
>
> The .txt file is the text of his email :)
>
> Chris Taylor - chris@x-bb.org - The guy with the PS2 WebServer -
> http://www.x-bb.org/chris.asc
>
> - ----- Original Message -----
> From: "Aaron Sturm" <aa...@hotmail.com>
> To: <us...@httpd.apache.org>
> Sent: Friday, December 27, 2002 1:24 AM
> Subject: Re: [users@httpd] Content Negotiation with <DirectoryMatch>
> in Apache 2.0.43
>
>
> > I keep getting attachments that I'm not willing to open... anyone
> > else getting this?
> >
> > -Aaron
> >
> > ----- Original Message -----
> > From: "imacat" <im...@mail.imacat.idv.tw>
> > To: "Apache Users" <us...@httpd.apache.org>
> > Sent: Thursday, December 26, 2002 10:02 AM
> > Subject: [users@httpd] Content Negotiation with <DirectoryMatch> in
> > Apache 2.0.43
> >
> >
> > --------------------------------------------------------------------
> > - The official User-To-User support forum of the Apache HTTP Server
> > Project. See <URL:http://httpd.apache.org/userslist.html> for more
> > info.
> > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> >    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> > For additional commands, e-mail: users-help@httpd.apache.org
>
> -----BEGIN PGP SIGNATURE-----
> Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>
>
> iQA/AwUBPguvDSqf8lmE2RZkEQKwJACcCv4wwY8CriYMcQeW0yyDuz5Y8P8An1rq
> s7aGiH0xJIsKjY0G1EOOxdye
> =Qjy+
> -----END PGP SIGNATURE-----
>
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Content Negotiation with in Apache 2.0.43

Posted by Chris Taylor <ch...@x-bb.org>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Yes, it's Imacat's mail client I'm guessing....

The .txt file is the text of his email :)

Chris Taylor - chris@x-bb.org - The guy with the PS2 WebServer -
http://www.x-bb.org/chris.asc

- ----- Original Message ----- 
From: "Aaron Sturm" <aa...@hotmail.com>
To: <us...@httpd.apache.org>
Sent: Friday, December 27, 2002 1:24 AM
Subject: Re: [users@httpd] Content Negotiation with <DirectoryMatch>
in Apache 2.0.43


> I keep getting attachments that I'm not willing to open... anyone
> else getting this?
> 
> -Aaron
> 
> ----- Original Message -----
> From: "imacat" <im...@mail.imacat.idv.tw>
> To: "Apache Users" <us...@httpd.apache.org>
> Sent: Thursday, December 26, 2002 10:02 AM
> Subject: [users@httpd] Content Negotiation with <DirectoryMatch> in
> Apache 2.0.43
> 
> 
> --------------------------------------------------------------------
> - The official User-To-User support forum of the Apache HTTP Server
> Project. See <URL:http://httpd.apache.org/userslist.html> for more
> info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>

iQA/AwUBPguvDSqf8lmE2RZkEQKwJACcCv4wwY8CriYMcQeW0yyDuz5Y8P8An1rq
s7aGiH0xJIsKjY0G1EOOxdye
=Qjy+
-----END PGP SIGNATURE-----



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Content Negotiation with in Apache 2.0.43

Posted by Rich Bowen <rb...@rcbowen.com>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thu, 26 Dec 2002, Aaron Sturm wrote:

> I keep getting attachments that I'm not willing to open... anyone else
> getting this?

It's a PGP signature. A lot of us use PGP to sign our mail messages. If
your mail client does not know what it is, you can either ignore it, or
get another mail client.

- -- 
Rich Bowen - rbowen@rcbowen.com
... and another brother out of his mind, and another brother out at New
York (not the same, though it might appear so)
	Somebody's Luggage (Charles Dickens)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
Comment: Made with pgp4pine 1.75-6

iD8DBQE+DI1WXP03+sx4yJMRAu+0AKCzqEUzjxKuoAHQUaGeq9ZMgV6/XQCgia3N
XUDrfd/TRqoh81lnEd+m4WE=
=mD3G
-----END PGP SIGNATURE-----



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Content Negotiation with in Apache 2.0.43

Posted by Aaron Sturm <aa...@hotmail.com>.
I keep getting attachments that I'm not willing to open... anyone else
getting this?

-Aaron

----- Original Message -----
From: "imacat" <im...@mail.imacat.idv.tw>
To: "Apache Users" <us...@httpd.apache.org>
Sent: Thursday, December 26, 2002 10:02 AM
Subject: [users@httpd] Content Negotiation with <DirectoryMatch> in Apache
2.0.43


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Content Negotiation with in Apache 2.0.43

Posted by Joshua Slive <jo...@slive.ca>.
On Wed, 8 Jan 2003, Matus "fantomas" Uhlar wrote:

> ->     I believe I did not found anything related to this problem.  Maybe I
> -> have missed something somewhere.
> ->
> ->     I cannot do content negotiation with <DirectoryMatch> in Apache
> -> 2.0.43.  My testing httpd.conf is:

I believe there is a bug in DirectoryMatch processing in 2.0.43.  It is
fixed in the next version, due out soon.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Content Negotiation with in Apache 2.0.43

Posted by "Matus \"fantomas\" Uhlar" <uh...@fantomas.sk>.
->     I believe I did not found anything related to this problem.  Maybe I
-> have missed something somewhere.
-> 
->     I cannot do content negotiation with <DirectoryMatch> in Apache
-> 2.0.43.  My testing httpd.conf is:

-> User nobody
-> Group nogroup
-> DocumentRoot /var/tmp/htdocs
-> PidFile /var/run/httpd2.pid
-> Listen 50080
-> ErrorLog /var/log/apache/error_log
-> Options +MultiViews
-> DirectoryIndex index.html
-> 
-> AddLanguage en          .en
-> AddLanguage zh-tw       .zh-tw
-> AddLanguage zh-cn       .zh-cn
-> LanguagePriority zh-tw zh-cn en
-> 
-> <DirectoryMatch /var/tmp/htdocs>
-> </DirectoryMatch>


-> imacat@rinse ~ % ls /var/tmp/htdocs -l
-> total 12
-> -rw-r--r--    1 imacat   root          517 Dec 25 23:34 index.html.en
-> lrwxrwxrwx    1 imacat   root           13 Dec 25 23:36 index.html.html -> index.html.en
-> -rw-r--r--    1 imacat   root          504 Dec 25 23:35 index.html.zh-cn
-> -rw-r--r--    1 imacat   root          500 Dec 25 23:35 index.html.zh-tw

->     After starting /usr/sbin/httpd2 -f /etc/apache/httpd2.conf-test, and
-> try to connect, I get:
-> 
-> imacat@rinse ~ % lynx -dump http://rinse:50080/
->                                   Index of /
-> 
->      * [1]index.html.en
->      * [2]index.html.html
->      * [3]index.html.zh-cn
->      * [4]index.html.zh-tw

->     This is strange.  It should display index.html.html.  

You probably should try DefaultLanguage directive


-- 
 Matus "fantomas" Uhlar, uhlar@fantomas.sk ; http://www.fantomas.sk/
 Warning: I don't wish to receive spam to this address.
 Varovanie: Nezelam si na tuto adresu dostavat akukolvek reklamnu postu.
 Atheism is a non-prophet organization. 

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Content Negotiation with in Apache 2.0.43

Posted by imacat <im...@mail.imacat.idv.tw>.
On Fri, 27 Dec 2002 12:33:58 -0500 (EST)
Rich Bowen <rb...@rcbowen.com> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> On Thu, 26 Dec 2002, imacat wrote:
> > imacat@rinse ~ % ls /var/tmp/htdocs -l
> > total 12
> > -rw-r--r--    1 imacat   root          517 Dec 25 23:34 index.html.en
> > lrwxrwxrwx    1 imacat   root           13 Dec 25 23:36 index.html.html -> 
> index.html.en
> 
> This symlink will be explicitly ignored, since you don't have Options
> FollowSymLinks turned on, as far as I can tell.

    Yes, you are right.  And it does not do anything at all here.  Lynx
does send a Accept-Language header.  There's no need to be a default
document.  It should be removed.

> What Accept headers is lynx sending? What do the associated entries in
> the access log look like?

imacat@rinse ~ % cat /usr/local/apache/htdocs/imacat/cgi-bin/dumphead.cgi
#! /bin/sh
echo "Content-Type: text/plain; charset=US-ASCII"
echo
set | grep ^HTTP_
imacat@rinse ~ % lynx -dump http://imacat/cgi-bin/dumphead.cgi
HTTP_ACCEPT='text/html, text/plain, text/sgml, */*;q=0.01'
HTTP_ACCEPT_CHARSET='big5, iso-8859-1;q=0.01, us-ascii;q=0.01'
HTTP_ACCEPT_ENCODING='gzip, compress'
HTTP_ACCEPT_LANGUAGE=en
HTTP_HOST=imacat
HTTP_USER_AGENT='Lynx/2.8.4rel.1 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/0.9.6g'

imacat@rinse ~ % 

    I believe its "en" here.  The Accept-Charset has no effect here,
since there's no AddCharset in the configuration file.

> No, it should not, because that file is a symlink. Add
> Options +FollowSymlinks
> and see what happens.

    Yes, you are right. ^^;  I made a mistake at this point.  It's not
used anyway.

> > comment out <DirectoryMatch>:
> >
> >     And try again, I'll get:
> >
> > imacat@rinse ~ % lynx -dump http://rinse:50080/
> >                                    Test Page
> >
> >    This is a test page.
> > imacat@rinse ~ %
> 
> OK, this makes no sense to me at all. An empty <DirectoryMatch> section
> should not have any effect on the results at all. I probably need to
> experiment with this some on my own server.

    Well, that's the whole point. ^_*'  My original configuration file
is far more complicated.  It's:

imacat@rinse ~ % wc -l /etc/apache/httpd.conf
    890 /etc/apache/httpd.conf
imacat@rinse ~ % cat /etc/apache/httpd.conf
...
<DirectoryMatch /usr/local/apache/htdocs/(wov|imacat|emandy|emily|htc)>
        ErrorDocument 400 /errors/400.html
        ErrorDocument 401 /errors/401.html
        ErrorDocument 403 /errors/403.html
        ErrorDocument 404 /errors/404.html
</DirectoryMatch>
...
imacat@rinse ~ % 

    I certainly will not put the whole 890 lines here.  It makes no
sense to debug such a large file on this list.  I simplified the problem
as much as possible.  What I posted here (httpd2.conf-test) is the
simplest abstract that can work and demostrate this problem.

    I had suspected if the problem comes from ErrorDocument, but then I
was wrong.  An empty <DirectoryMatch> disables the content negotiation
of the directory index file, too.

    Of course, I can work around my own problem by having multiple
<Directory>s instead of a single <DirectoryMatch>.  But that makes my
configuration file more complicated.  Besides, I still consider this as
a problem that should be solved.  I wish to make clear what happens here.

> It is certainly not desired behavior. Try my suggestions, and I'll do
> some experimentation on this end, now that I have some free time
> available. I'll get back to you on this.

    Thank you. ^_*'

    By the way, type maps work here.  (Thanks to Irmund Thum. ^_*')   I
shall consider using it, since it is much faster, according to the
description.  But it is painful to add type maps, as I'm using content
negotiation throughout my websites.  Also, as I said above, I still
consider this as a problem that should be solved.  It does not work as
expected, according to the current documentation.  If this is indeed a
bug, there should be some fix on this.

--
Best regards,
imacat ^_*'
imacat@mail.imacat.idv.tw
PGP Key: http://www.imacat.idv.tw/me/pgpkey.txt

<<Woman's Voice>> News: http://www.wov.idv.tw/
Tavern IMACAT's: http://www.imacat.idv.tw/
TLUG List Manager: http://www.linux.org.tw/mailman/listinfo/tlug

Re: [users@httpd] Content Negotiation with in Apache 2.0.43

Posted by Rich Bowen <rb...@rcbowen.com>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thu, 26 Dec 2002, imacat wrote:

>     I believe I did not found anything related to this problem.  Maybe I
> have missed something somewhere.

Since people got sidetracked, and nobody actually addressed your
question ...

>     I cannot do content negotiation with <DirectoryMatch> in Apache
> 2.0.43.  My testing httpd.conf is:
>
> imacat@rinse ~ % cat /etc/apache/httpd2.conf-test
> User nobody
> Group nogroup
> DocumentRoot /var/tmp/htdocs
> PidFile /var/run/httpd2.pid
> Listen 50080
> ErrorLog /var/log/apache/error_log
> Options +MultiViews
> DirectoryIndex index.html
>
> AddLanguage en          .en
> AddLanguage zh-tw       .zh-tw
> AddLanguage zh-cn       .zh-cn
> LanguagePriority zh-tw zh-cn en
>
> <DirectoryMatch /var/tmp/htdocs>
> </DirectoryMatch>

I'm a little confused here. You have Multiviews on for the whole server.
The empty DirectoryMatch section does not do anything at all. It does
not add to, or detract from, the content-negotiation setting. I'm not
entirely clear, from your description, exactly what is happening.

> imacat@rinse ~ %
>
>     My document root is:
>
> imacat@rinse ~ % ls /var/tmp/htdocs -l
> total 12
> -rw-r--r--    1 imacat   root          517 Dec 25 23:34 index.html.en
> lrwxrwxrwx    1 imacat   root           13 Dec 25 23:36 index.html.html -> index.html.en

This symlink will be explicitly ignored, since you don't have Options
FollowSymLinks turned on, as far as I can tell.

> -rw-r--r--    1 imacat   root          504 Dec 25 23:35 index.html.zh-cn
> -rw-r--r--    1 imacat   root          500 Dec 25 23:35 index.html.zh-tw

>     After starting /usr/sbin/httpd2 -f /etc/apache/httpd2.conf-test, and
> try to connect, I get:
>
> imacat@rinse ~ % lynx -dump http://rinse:50080/
>                                   Index of /
>
>      * [1]index.html.en
>      * [2]index.html.html
>      * [3]index.html.zh-cn
>      * [4]index.html.zh-tw

What Accept headers is lynx sending? What do the associated entries in
the access log look like?

>     This is strange.  It should display index.html.html.  And if I

No, it should not, because that file is a symlink. Add

Options +FollowSymlinks

and see what happens.

> comment out <DirectoryMatch>:
>
> imacat@rinse ~ % cat /etc/apache/httpd2.conf-test
> User nobody
> Group nogroup
> DocumentRoot /var/tmp/htdocs
> PidFile /var/run/httpd2.pid
> Listen 50080
> ErrorLog /var/log/apache/error_log
> Options +MultiViews
> DirectoryIndex index.html
>
> AddLanguage en          .en
> AddLanguage zh-tw       .zh-tw
> AddLanguage zh-cn       .zh-cn
> LanguagePriority zh-tw zh-cn en
>
> #<DirectoryMatch /var/tmp/htdocs>
> #</DirectoryMatch>
> imacat@rinse ~ %
>
>     And try again, I'll get:
>
> imacat@rinse ~ % lynx -dump http://rinse:50080/
>                                    Test Page
>
>    This is a test page.
> imacat@rinse ~ %
>
>     which is the correct answer.

OK, this makes no sense to me at all. An empty <DirectoryMatch> section
should not have any effect on the results at all. I probably need to
experiment with this some on my own server.

>     This had never happened before in Apache 1.3.x (at least in my
> experience).  I'm using content negotiation throughout my website, along
> with several <DirectoryMatch>.  I cannot switch to Apache 2 now for this
> reason.  This does not happen on <Directory> or <LocationMatch>.  It
> only seems to be a problem of <DirectoryMatch>
>
>     I don't know if anyone has noticed this, or if I have missed
> something in the Apache 2 documentation.  I have tried some search on
> the mailing list archives, but found nothing.  Can anyone give me a hint
> on this?  Or is it really a bug?

It is certainly not desired behavior. Try my suggestions, and I'll do
some experimentation on this end, now that I have some free time
available. I'll get back to you on this.

- -- 
Rich Bowen - rbowen@rcbowen.com
ReefKnot - http://www.reefknot.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
Comment: Made with pgp4pine 1.75-6

iD8DBQE+DI8NXP03+sx4yJMRAkOSAKCWTHUh1l8w5WOCk1RpR/Hi7Lje2QCgqeiv
I+sRLhbJdhh/k203TIszOMI=
=TuXi
-----END PGP SIGNATURE-----



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org