(RFC 3986) Clarification around interpreting literal plus in URLs (U+002B)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear IETF Community,

I was writing to seek clarification around URIs & HTTP, specifically how to handle "plus" ("+") symbols in them.

For instance, if my server receives a request for `GET /page?key=A+B` , where the bytes over the wire are literally [0x412B42], should I interpret it as literally that byte sequence, or decode the "+" to a space, thereby interpreting the bytes as [0x412042]?

From my reading of RFC3986, it seems that "+" is a reserved character, but it's not clear how it is to be interpreted / decoded.

The question behind the question is how should spaces be encoded to be URL safe; it seems "%20" is the recommended approach, however some languages (such as Golang[0]) implement query-escaping where the spaces (0x20) are replaced by a literal "+" (0x2B). This causes problems by some libraries which then treat this as a literal "plus" (0x2B) and then return unexpected results.

Regards,

Raghu Saxena

[0] https://github.com/golang/go/blob/a1ddbdd3ef8b739aab53f20d6ed0a61c3474cf12/src/net/url/url.go#L328-L330

Attachment: OpenPGP_0xA1E21ED06A67D28A.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [IETF Annoucements]     [IETF]     [IP Storage]     [Yosemite News]     [Linux SCTP]     [Linux Newbies]     [Mhonarc]     [Fedora Users]

  Powered by Linux