Protocols.HTTP.http_encode_string

View: New views
4 Messages — Rating Filter:   Alert me  

Protocols.HTTP.http_encode_string

by Marcus Comstedt (ACROSS) (Hail Ilpalazzo!) @ Pike (-) developers forum :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Correction: Standards.URI.http_encode does not encode any 8-bit chars,
the unused Standards.URI.quote does.

Protocols.HTTP.http_encode_string

by Marcus Comstedt (ACROSS) (Hail Ilpalazzo!) @ Pike (-) developers forum :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hm, don't you mean the other way around?

Pike v7.7 release 87 running Hilfe v3.5 (Incremental Pike Frontend)
> Standards.URI("http://www.roxen.com/")->quote("räksmörgås");
(1) Result: "r\344ksm\366rg\345s"
> Standards.URI("http://www.roxen.com/")->http_encode("räksmörgås");
(2) Result: "r%e4ksm%f6rg%e5s"
>

Protocols.HTTP.http_encode_string

by Marcus Comstedt (ACROSS) (Hail Ilpalazzo!) @ Pike (-) developers forum :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

No, but I missed the "enumerate(0x81,1,0x7f)" in the http_encode
implementation. The quote functions encodes some 8-bit chars too:

  > Standards.URI("http://x/")->quote("\200");
  (1) Result: "%80"

Protocols.HTTP.http_encode_string

by Marcus Comstedt (ACROSS) (Hail Ilpalazzo!) @ Pike (-) developers forum :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Right.  Only non-printables though.  This feels like a can of worms
that someone ought to take outside and empty...  :-)
LightInTheBox - Buy quality products at wholesale price