I need to accept a list of file names in a query string. ie:
http://someSite/someApp/myUtil.ashx?files=file1.txt|file2.bmp|file3.doc
Do you have any recommendations on what delimiter to use?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If they’re filenames, a good choice would be a character which is disallowed in filenames. Suggestions so far included
, | &which are generally allowed in filenames and therefore might lead to ambiguities./on the other hand is generally not allowed, not even on Windows. It is allowed in URIs, and it has no special meaning in query strings.Example:
http://someSite/someApp/myUtil.ashx?files=file1.txt|file2.bmp|file3.docis bad because it may refer to the valid filefile1.txt|file2.bmp.http://someSite/someApp/myUtil.ashx?files=file1.txt/file2.bmp/file3.docunambiguously refers to 3 files.