documents with a "+" in the filename cause problems

Issue #1934 resolved
Robert Jäschke created an issue

I just uploaded a document for a publication which contains a "+" in its file name ("2009_Science_Discher_GF+ForceInfluenceOnSC.pdf"). This practically makes the file inaccessible:

  1. No preview image is shown, since the file http://www.bibsonomy.org/documents/213f8da638956e4cf891d5a1512e03b8/jaeschke/2009_Science_Discher_GF%2BForceInfluenceOnSC.pdf?preview=LARGE does not exist.
  2. The document itself is not available.
  3. Even over the API I get a 404 error upon accessing http://www.bibsonomy.org/api/users/jaeschke/posts/213f8da638956e4cf891d5a1512e03b8/documents/2009_Science_Discher_GF+ForceInfluenceOnSC.pdf

(Please check this with your own posts, since accessing my documents is only allowed for me.)

I am pretty sure that the problem has to do with the role of "+" as substitue for " " (space) in URLs. I guess that the %2B at some point becomes a "+" and is then interpreted as " " which causes the error. Please find out, where and why this happens.

Comments (6)

  1. Daniel Zoller

    Please note, that "+" is not a substitute for a space in URLs. It is only a substitute in x-www-form-urlencoded data (see http://www.w3.org/TR/html4/interact/forms.html#h-17.13.4.1). Because we are using Java's URLDecoder that decodes x-www-form-urlencoded data in the Path Tokenizer in the api, the + is converted to a space. I guess that the url rewrite lib we are using also uses the URLDecoder in rewriting the request.

  2. Log in to comment