chicken-janitors
[Top][All Lists]
Advanced

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

Re: [Chicken-janitors] #998: uri->string / make-uri path encoding incons


From: Chicken Trac
Subject: Re: [Chicken-janitors] #998: uri->string / make-uri path encoding inconsistencies
Date: Thu, 14 Mar 2013 21:31:10 -0000

#998: uri->string / make-uri path encoding inconsistencies
----------------------+-----------------------------------------------------
  Reporter:  andyjpb  |       Owner:  sjamaan 
      Type:  defect   |      Status:  accepted
  Priority:  major    |   Milestone:  someday 
 Component:  unknown  |     Version:  4.8.x   
Resolution:           |    Keywords:          
----------------------+-----------------------------------------------------

Comment(by sjamaan):

 Long story short: the current behaviour is emphatically '''not'''
 incorrect as you so boldly stated. The current behavior could be up for
 debate, but the issues involved are rather intricate and generally tricky
 so I'd rather not change it unless it really causes too much trouble.

 The fundamental problem is that uri-common ''fully decodes'' all its
 components (this is stated in the manual), which is a lossy conversion.
 When putting back together the components they're kept as-is (to prevent
 this lossage) unless you've supplied them yourself, in which case they are
 always encoded in the most conservative way.

 Perhaps this is fundamentally wrong; for example, it's quite possible that
 some frameworks would accept "foo[]" as a query key named "foo" which must
 be an array whereas "foo%5b%5d" would be a query key named "foo[]".
 Strictly speaking, I believe this is allowed by the spec.  If this turns
 out to be a major problem, I might decide to deprecate uri-common
 altogether unless a clean solution can be cooked up.

-- 
Ticket URL: <http://bugs.call-cc.org/ticket/998#comment:3>
Chicken Scheme <http://www.call-with-current-continuation.org/>
Chicken Scheme is a compiler for the Scheme programming language.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]