Difference between revisions of "Talk:Ns url2file"
Jump to navigation
Jump to search
(What happens to special characters?) |
(No difference)
|
Revision as of 03:43, 5 December 2007
What happens to special characters?
If the url contains, e.g., the '+' character or the sequence '%20', does ns_url2file unencode it the same as the underlying page finding code does?
In AOLServer 3.4.2, it doesn't look like it does. Say I request the url '/foo%20bar.html'. If I use a Tcl library function as a "404" handler (using the file-system-as-cache technique), and generate my file via
set file [open "[ns_url2file $url]" w] puts $file $content close $file
Then the '$url' is still Not Found on the next request. I'm getting the URL by directly reading the request header (since I'm in a redirection routine, the value of [ns_conn url] is my redirected URL, not the URL originally requested).
Thought I'd ask here since it would be nice if the wiki page got updated with the answer....