views:

60

answers:

2

Due to a miscommunication with an affiliate partner we're working with the URL they call on our server has been mixed up.

This is the URL they are supposed to call on our server :

 /AAAAAAAA/?b=CCCCCCC

unfotunately it was implemented in their system as this

 ?b=CCCCCCC/AAAAAAA

I can easily parse out the components, but I'm worried that a query string parameter with / in it is not actually a valid URL.

Is a / in a URL actually valid - or should I be concerned. Under what circumstances may an unencoded / cause problems in a query string.

+1  A: 

Although I've never had a problem, they're not technically allowed as per RFC 2396:

Within a query component, the characters ";", "/", "?", ":", "@", "&", "=", "+", ",", and "$" are reserved.

But as I said...I've never run into any issues. I think it's a problem with older browsers more than anything, but maybe someone can shed some more light on a problem this causes?

Nick Craver
i kinda figured that technically it wasn't allowed (for obvious reasons) but I'd have thought it would pretty much be ok. with that said i'm wondering if some funky thins might occur with proxies, older browsers, security tools etc.
Simon_Weaver
@Simon - I have yet to find any ill-effects, but my uses of them are usually very specific, e.g. `Login?ru=Route/SubRoute/Category/45`.
Nick Craver
ok so hopefully we're fine for a week. thanks - and amazed someone that is actually using '/' managed to find my question so quickly!
Simon_Weaver
+2  A: 

Slash is a "reserved character" in the query part of a URL per RFC 2396 section 3.4, so according to section 2.2 it has to be encoded. That is, a query part can contain %2F but shouldn't contain /.

hobbs
but in practice is anything actually going to break? i want to get the URL format fixed but that will take a week for their next build
Simon_Weaver
@Simon If anyone knows the answer to that question it's you.
hobbs
@hobbs well it doesn't break for me in chrome or IE8, but maybe it does break for someone using Mosaic 1.0 ? i dunno ;-)
Simon_Weaver