rack-devel archive mirror (unofficial) https://groups.google.com/group/rack-devel
 help / color / mirror / code / Atom feed
From: Simon Chiang <simon.a.chiang@gmail.com>
To: Rack Development <rack-devel@googlegroups.com>
Subject: Why is there quote parsing on queries?
Date: Thu, 28 Jan 2010 10:20:20 -0800 (PST)	[thread overview]
Message-ID: <2d67024e-41cd-493b-838d-cf06cf4b64ce@g28g2000prb.googlegroups.com> (raw)

Rack currently parses out quoted values such that you get this:

  foo='bar'   # => {"foo" => "bar"}

Rather than this:

  foo='bar'   # => {"foo" => "'bar'"}

I came across this when I was trying to send multiple quoted values
through a text field such that:

  Text Field           Encoded String                  String After
Parsing
  "'a' 'b'"                %27a%27+%27b%27        "a' 'b"
  " 'a' 'b' "              +%27a%27+%27b%27+    " 'a' 'b' "

It seems confusing because when a user adds spaces, the quotes are
suddenly preserved.  Obviously a user could work around this by
quoting the whole thing (ie "\"'a' 'b'\"") but I just wanted to know
if this is part of the URL specification someplace, or is quote
parsing a convention introduced by rack?

             reply	other threads:[~2010-01-28 19:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-28 18:20 Simon Chiang [this message]
2010-01-29 12:45 ` Iñaki Baz Castillo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://groups.google.com/group/rack-devel

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2d67024e-41cd-493b-838d-cf06cf4b64ce@g28g2000prb.googlegroups.com \
    --to=rack-devel@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this inbox:

	https://80x24.org/mirrors/rack.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).