You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Anthony Cunningham <an...@om.asahi-kasei.co.jp> on 2003/01/09 10:10:00 UTC

[users@httpd] Apache returns 404 not found for non ascii filenames with Java Plugin.

I searched the archives and the web for this problem but was unable to
find a clear solution.
Basically the problem is as follows:

In our java applet it downloads images from the web server.  Recently we
have been experimenting with using Apache 2 on windows instead of IIS.
A lot of our images have japanese character filenames and/or japanese
character directory paths. ie. non-ascii.
Apache will return a 404 not found for these.

for example: (I can't write japanese with this mail client so I will use
capital letters to indicate japanese characters)
if the file is images/JA_NAME.jpg
then Apache returns 404 not found.
In the access log Apache shows a request for images/JA_NAME.jpg and a
404.  This file exists exactly as Apache wrote in the log.
If you enter images/ in the browser it lists all the files, including
images/JA_NAME.jpg.
Click on this and the browser will load
images/%e6%bc%a2%e5%ad%97%e5%90%8d.jpg and you can see the image.
In the access log it shows images/%e6%bc%a2%e5%ad%97%e5%90%8d.jpg and
200 which I assume means success.

A few other points
In Internet Explorer 5.5 entering either images/JA_NAME.jpg or
images/%e6%bc%a2%e5%ad%97%e5%90%8d.jpg succeeds so maybe IE converts
before requesting.
In Netscape(R) Communicator 4.7 Japanese version only
images/%e6%bc%a2%e5%ad%97%e5%90%8d.jpg will work.
If java is told explicity to load images/%e6%bc%a2%e5%ad%97%e5%90%8d.jpg
it will work.

My boss read on the internet about a module called mod_encoding for
non-ascii files however this seems to be for linux only.  I'm not sure
if there is a version for windows yet.  Does anyone have any information
about this.

It may seem to be a problem with java and URL encoding and could well be
however the fact that it works fine with IIS makes me wonder if there is
a way to get it working on Apache Win32.

I would appreciate any help or experience anyone can give.

Anthony

Details:
Apache/2.0.43 Win32
Windows NT (Japanese ) and Windows 2000 (Japanese)
Java Plugin 1.4 and 1.3

For future searchers of this and similar topics:
unicode filename
doublebyte filename
multibyte filename
japanesee filename
non-ascii files






---------------------------------------------------------------------
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] Apache returns 404 not found for non ascii filenames with Java Plugin.

Posted by Anthony Cunningham <an...@om.asahi-kasei.co.jp>.
I don't know if you are using java for it (java is where I have the problem) but
here are a few ideas I don't have time to try at the moment:
If you think some may help your situation please try them and if they work I'd
be grateful if you could let me know.

My boss found a setting in IE (in japanese) that said something like always send
URL in UTF-8.
Java has a decodeurl and encodeurl static class and method.
>From java 1.4 you can specify the language encoding of the URL.

I tried it on java 1.3 which doesn't let you specify the encoding and it encoded
the ":" in http:// to %<some number> and then Java's URL class said it wasn't a
valid URL.  I didn't have time to experiment further.

I have yet to try just encoding the japanese filename and then appending that to
"http://somehost/somedir/".
I also plan to try encoding using different language encodings but have to
upgrade to Java SDK 1.4 for that.


its on the back burner at the moment but when I check some of those ideas and if
I get it working I'll let you know.

anthony.

Jeff Cohen wrote:

> Hi Anthony,
>
> I'm still looking for a solution for both of us I guess, I just started
> building a web based photo album and I need that Hebrew support, when I'll
> get the answer for it, I'll let you know.
>
> Jeff Cohen
>
> > -----Original Message-----
> > From: Anthony Cunningham [mailto:anthony.cb@om.asahi-kasei.co.jp]
> > Sent: Thursday, January 09, 2003 8:55 PM
> > To: users@httpd.apache.org
> > Subject: Re: [users@httpd] Apache returns 404 not found for non ascii
> > filenames with Java Plugin.
> >
> > Thanks Jeff,
> >
> > I downloaded and tried  1.3.27 on win32 (the latest 1.3 version I believe)
> > yesterday but now the URL images/JA_NAME.jpg becomes
> > \xb6\xc0\xb6\xc5/\xb6\xc0\x83J\x83i.jpg in the access log with a 403
> > and the url images/%e6%bc%a2%e5%ad%97%e5%90%8d.jpg have code 404.
> >
> > Anthony
> >
> >
> > Jeff Cohen wrote:
> >
> > > Hi Anthony,
> > >
> > > As far as I know (from same problem in Hebrew) this feature is not
> > supported
> > > in the 2.x versions, I didn't have that problem previously when I had
> > > 1.3.2x.
> > > If you find something that might make it to work I'll be very happy if
> > > you'll share it with me.
> > >
> > > All the best,
> > > Jeff Cohen
> > >
> > > > -----Original Message-----
> > > > From: Anthony Cunningham [mailto:anthony.cb@om.asahi-kasei.co.jp]
> > > > Sent: Thursday, January 09, 2003 4:10 AM
> > > > Subject: [users@httpd] Apache returns 404 not found for non ascii
> > > > filenames with Java Plugin.
> > > >
> > > > I searched the archives and the web for this problem but was unable to
> > > > find a clear solution.
> > > > Basically the problem is as follows:
> > > >
> > > > In our java applet it downloads images from the web server.  Recently
> > we
> > > > have been experimenting with using Apache 2 on windows instead of IIS.
> > > > A lot of our images have japanese character filenames and/or japanese
> > > > character directory paths. ie. non-ascii.
> > > > Apache will return a 404 not found for these.
> > > >
> > > > for example: (I can't write japanese with this mail client so I will
> > use
> > > > capital letters to indicate japanese characters)
> > > > if the file is images/JA_NAME.jpg
> > > > then Apache returns 404 not found.
> > > > In the access log Apache shows a request for images/JA_NAME.jpg and a
> > > > 404.  This file exists exactly as Apache wrote in the log.
> > > > If you enter images/ in the browser it lists all the files, including
> > > > images/JA_NAME.jpg.
> > > > Click on this and the browser will load
> > > > images/%e6%bc%a2%e5%ad%97%e5%90%8d.jpg and you can see the image.
> > > > In the access log it shows images/%e6%bc%a2%e5%ad%97%e5%90%8d.jpg and
> > > > 200 which I assume means success.
> > > >
> > > > A few other points
> > > > In Internet Explorer 5.5 entering either images/JA_NAME.jpg or
> > > > images/%e6%bc%a2%e5%ad%97%e5%90%8d.jpg succeeds so maybe IE converts
> > > > before requesting.
> > > > In Netscape(R) Communicator 4.7 Japanese version only
> > > > images/%e6%bc%a2%e5%ad%97%e5%90%8d.jpg will work.
> > > > If java is told explicity to load
> > images/%e6%bc%a2%e5%ad%97%e5%90%8d.jpg
> > > > it will work.
> > > >
> > > > My boss read on the internet about a module called mod_encoding for
> > > > non-ascii files however this seems to be for linux only.  I'm not sure
> > > > if there is a version for windows yet.  Does anyone have any
> > information
> > > > about this.
> > > >
> > > > It may seem to be a problem with java and URL encoding and could well
> > be
> > > > however the fact that it works fine with IIS makes me wonder if there
> > is
> > > > a way to get it working on Apache Win32.
> > > >
> > > > I would appreciate any help or experience anyone can give.
> > > >
> > > > Anthony
> > > >
> > > > Details:
> > > > Apache/2.0.43 Win32
> > > > Windows NT (Japanese ) and Windows 2000 (Japanese)
> > > > Java Plugin 1.4 and 1.3
> > > >
> > > > For future searchers of this and similar topics:
> > > > unicode filename
> > > > doublebyte filename
> > > > multibyte filename
> > > > japanesee filename
> > > > non-ascii files
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > 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
> >
> >
> > ---------------------------------------------------------------------
> > 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


---------------------------------------------------------------------
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] Apache returns 404 not found for non ascii filenames with Java Plugin.

Posted by Jeff Cohen <ap...@gej-it.com>.
Hi Anthony,

I'm still looking for a solution for both of us I guess, I just started
building a web based photo album and I need that Hebrew support, when I'll
get the answer for it, I'll let you know.

Jeff Cohen

> -----Original Message-----
> From: Anthony Cunningham [mailto:anthony.cb@om.asahi-kasei.co.jp]
> Sent: Thursday, January 09, 2003 8:55 PM
> To: users@httpd.apache.org
> Subject: Re: [users@httpd] Apache returns 404 not found for non ascii
> filenames with Java Plugin.
> 
> Thanks Jeff,
> 
> I downloaded and tried  1.3.27 on win32 (the latest 1.3 version I believe)
> yesterday but now the URL images/JA_NAME.jpg becomes
> \xb6\xc0\xb6\xc5/\xb6\xc0\x83J\x83i.jpg in the access log with a 403
> and the url images/%e6%bc%a2%e5%ad%97%e5%90%8d.jpg have code 404.
> 
> Anthony
> 
> 
> Jeff Cohen wrote:
> 
> > Hi Anthony,
> >
> > As far as I know (from same problem in Hebrew) this feature is not
> supported
> > in the 2.x versions, I didn't have that problem previously when I had
> > 1.3.2x.
> > If you find something that might make it to work I'll be very happy if
> > you'll share it with me.
> >
> > All the best,
> > Jeff Cohen
> >
> > > -----Original Message-----
> > > From: Anthony Cunningham [mailto:anthony.cb@om.asahi-kasei.co.jp]
> > > Sent: Thursday, January 09, 2003 4:10 AM
> > > Subject: [users@httpd] Apache returns 404 not found for non ascii
> > > filenames with Java Plugin.
> > >
> > > I searched the archives and the web for this problem but was unable to
> > > find a clear solution.
> > > Basically the problem is as follows:
> > >
> > > In our java applet it downloads images from the web server.  Recently
> we
> > > have been experimenting with using Apache 2 on windows instead of IIS.
> > > A lot of our images have japanese character filenames and/or japanese
> > > character directory paths. ie. non-ascii.
> > > Apache will return a 404 not found for these.
> > >
> > > for example: (I can't write japanese with this mail client so I will
> use
> > > capital letters to indicate japanese characters)
> > > if the file is images/JA_NAME.jpg
> > > then Apache returns 404 not found.
> > > In the access log Apache shows a request for images/JA_NAME.jpg and a
> > > 404.  This file exists exactly as Apache wrote in the log.
> > > If you enter images/ in the browser it lists all the files, including
> > > images/JA_NAME.jpg.
> > > Click on this and the browser will load
> > > images/%e6%bc%a2%e5%ad%97%e5%90%8d.jpg and you can see the image.
> > > In the access log it shows images/%e6%bc%a2%e5%ad%97%e5%90%8d.jpg and
> > > 200 which I assume means success.
> > >
> > > A few other points
> > > In Internet Explorer 5.5 entering either images/JA_NAME.jpg or
> > > images/%e6%bc%a2%e5%ad%97%e5%90%8d.jpg succeeds so maybe IE converts
> > > before requesting.
> > > In Netscape(R) Communicator 4.7 Japanese version only
> > > images/%e6%bc%a2%e5%ad%97%e5%90%8d.jpg will work.
> > > If java is told explicity to load
> images/%e6%bc%a2%e5%ad%97%e5%90%8d.jpg
> > > it will work.
> > >
> > > My boss read on the internet about a module called mod_encoding for
> > > non-ascii files however this seems to be for linux only.  I'm not sure
> > > if there is a version for windows yet.  Does anyone have any
> information
> > > about this.
> > >
> > > It may seem to be a problem with java and URL encoding and could well
> be
> > > however the fact that it works fine with IIS makes me wonder if there
> is
> > > a way to get it working on Apache Win32.
> > >
> > > I would appreciate any help or experience anyone can give.
> > >
> > > Anthony
> > >
> > > Details:
> > > Apache/2.0.43 Win32
> > > Windows NT (Japanese ) and Windows 2000 (Japanese)
> > > Java Plugin 1.4 and 1.3
> > >
> > > For future searchers of this and similar topics:
> > > unicode filename
> > > doublebyte filename
> > > multibyte filename
> > > japanesee filename
> > > non-ascii files
> > >
> > >
> > >
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > 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
> 
> 
> ---------------------------------------------------------------------
> 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] Apache returns 404 not found for non ascii filenames with Java Plugin.

Posted by Anthony Cunningham <an...@om.asahi-kasei.co.jp>.
Thanks Jeff,

I downloaded and tried  1.3.27 on win32 (the latest 1.3 version I believe)
yesterday but now the URL images/JA_NAME.jpg becomes
\xb6\xc0\xb6\xc5/\xb6\xc0\x83J\x83i.jpg in the access log with a 403
and the url images/%e6%bc%a2%e5%ad%97%e5%90%8d.jpg have code 404.

Anthony


Jeff Cohen wrote:

> Hi Anthony,
>
> As far as I know (from same problem in Hebrew) this feature is not supported
> in the 2.x versions, I didn't have that problem previously when I had
> 1.3.2x.
> If you find something that might make it to work I'll be very happy if
> you'll share it with me.
>
> All the best,
> Jeff Cohen
>
> > -----Original Message-----
> > From: Anthony Cunningham [mailto:anthony.cb@om.asahi-kasei.co.jp]
> > Sent: Thursday, January 09, 2003 4:10 AM
> > Subject: [users@httpd] Apache returns 404 not found for non ascii
> > filenames with Java Plugin.
> >
> > I searched the archives and the web for this problem but was unable to
> > find a clear solution.
> > Basically the problem is as follows:
> >
> > In our java applet it downloads images from the web server.  Recently we
> > have been experimenting with using Apache 2 on windows instead of IIS.
> > A lot of our images have japanese character filenames and/or japanese
> > character directory paths. ie. non-ascii.
> > Apache will return a 404 not found for these.
> >
> > for example: (I can't write japanese with this mail client so I will use
> > capital letters to indicate japanese characters)
> > if the file is images/JA_NAME.jpg
> > then Apache returns 404 not found.
> > In the access log Apache shows a request for images/JA_NAME.jpg and a
> > 404.  This file exists exactly as Apache wrote in the log.
> > If you enter images/ in the browser it lists all the files, including
> > images/JA_NAME.jpg.
> > Click on this and the browser will load
> > images/%e6%bc%a2%e5%ad%97%e5%90%8d.jpg and you can see the image.
> > In the access log it shows images/%e6%bc%a2%e5%ad%97%e5%90%8d.jpg and
> > 200 which I assume means success.
> >
> > A few other points
> > In Internet Explorer 5.5 entering either images/JA_NAME.jpg or
> > images/%e6%bc%a2%e5%ad%97%e5%90%8d.jpg succeeds so maybe IE converts
> > before requesting.
> > In Netscape(R) Communicator 4.7 Japanese version only
> > images/%e6%bc%a2%e5%ad%97%e5%90%8d.jpg will work.
> > If java is told explicity to load images/%e6%bc%a2%e5%ad%97%e5%90%8d.jpg
> > it will work.
> >
> > My boss read on the internet about a module called mod_encoding for
> > non-ascii files however this seems to be for linux only.  I'm not sure
> > if there is a version for windows yet.  Does anyone have any information
> > about this.
> >
> > It may seem to be a problem with java and URL encoding and could well be
> > however the fact that it works fine with IIS makes me wonder if there is
> > a way to get it working on Apache Win32.
> >
> > I would appreciate any help or experience anyone can give.
> >
> > Anthony
> >
> > Details:
> > Apache/2.0.43 Win32
> > Windows NT (Japanese ) and Windows 2000 (Japanese)
> > Java Plugin 1.4 and 1.3
> >
> > For future searchers of this and similar topics:
> > unicode filename
> > doublebyte filename
> > multibyte filename
> > japanesee filename
> > non-ascii files
> >
> >
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > 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


---------------------------------------------------------------------
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] Apache returns 404 not found for non ascii filenames with Java Plugin.

Posted by Jeff Cohen <ap...@gej-it.com>.
Hi Anthony,

As far as I know (from same problem in Hebrew) this feature is not supported
in the 2.x versions, I didn't have that problem previously when I had
1.3.2x.
If you find something that might make it to work I'll be very happy if
you'll share it with me.

All the best,
Jeff Cohen

> -----Original Message-----
> From: Anthony Cunningham [mailto:anthony.cb@om.asahi-kasei.co.jp]
> Sent: Thursday, January 09, 2003 4:10 AM
> Subject: [users@httpd] Apache returns 404 not found for non ascii
> filenames with Java Plugin.
> 
> I searched the archives and the web for this problem but was unable to
> find a clear solution.
> Basically the problem is as follows:
> 
> In our java applet it downloads images from the web server.  Recently we
> have been experimenting with using Apache 2 on windows instead of IIS.
> A lot of our images have japanese character filenames and/or japanese
> character directory paths. ie. non-ascii.
> Apache will return a 404 not found for these.
> 
> for example: (I can't write japanese with this mail client so I will use
> capital letters to indicate japanese characters)
> if the file is images/JA_NAME.jpg
> then Apache returns 404 not found.
> In the access log Apache shows a request for images/JA_NAME.jpg and a
> 404.  This file exists exactly as Apache wrote in the log.
> If you enter images/ in the browser it lists all the files, including
> images/JA_NAME.jpg.
> Click on this and the browser will load
> images/%e6%bc%a2%e5%ad%97%e5%90%8d.jpg and you can see the image.
> In the access log it shows images/%e6%bc%a2%e5%ad%97%e5%90%8d.jpg and
> 200 which I assume means success.
> 
> A few other points
> In Internet Explorer 5.5 entering either images/JA_NAME.jpg or
> images/%e6%bc%a2%e5%ad%97%e5%90%8d.jpg succeeds so maybe IE converts
> before requesting.
> In Netscape(R) Communicator 4.7 Japanese version only
> images/%e6%bc%a2%e5%ad%97%e5%90%8d.jpg will work.
> If java is told explicity to load images/%e6%bc%a2%e5%ad%97%e5%90%8d.jpg
> it will work.
> 
> My boss read on the internet about a module called mod_encoding for
> non-ascii files however this seems to be for linux only.  I'm not sure
> if there is a version for windows yet.  Does anyone have any information
> about this.
> 
> It may seem to be a problem with java and URL encoding and could well be
> however the fact that it works fine with IIS makes me wonder if there is
> a way to get it working on Apache Win32.
> 
> I would appreciate any help or experience anyone can give.
> 
> Anthony
> 
> Details:
> Apache/2.0.43 Win32
> Windows NT (Japanese ) and Windows 2000 (Japanese)
> Java Plugin 1.4 and 1.3
> 
> For future searchers of this and similar topics:
> unicode filename
> doublebyte filename
> multibyte filename
> japanesee filename
> non-ascii files
> 
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> 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