Fog Creek Software
Discussion Board

Attached Document Download Bug?

We uploaded a document in to the fogubugz system (FogBUGZ Version 3.0.13 - Database Version 324) the document is named:

C# Language Specification.doc

Everything was great.
The developer who was eventually assigned the case gets a 404 error when he tries to download the file.

The URL for the file is: http://timesys/bugs/FileUploads/4252/C#%20Language%20Specification.doc

Usually the file is downloaded without problem.  Is this perhaps a url encoding issue?  It seems to work if I change the filename and url (remove the #)

Is there a better place to ask these types of questions?

Sam H
Friday, January 31, 2003

This will be fixed in the next minor release due out shortly.

(The problem is that Server.URLPathEncode doesn't encode '#' for some reason, Server.URLEncode does, but it encodes spaces as '+' when we need it to be encoded as %20, which is why we use URLPathEncode... phew!)

The workaround for now is open up dlgbugediting.asp and replace every instance of Server.URLPathEncode with FBUrlPathEncode.

Then open up util.asp and add a function:

Function FBUrlPathEncode( s )

    FBUrlPathEncode = replace(Server.UrlPathEncode(s), "#", "%23")

End Function

Michael H. Pryor
Friday, January 31, 2003

We had an easier work around, which was just to rename the file :)

Sam H
Tuesday, February 04, 2003

*  Recent Topics

*  Fog Creek Home