Re: [PATCH] Fix URL-escaping for domainDefine

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

 



On Thu, Sep 08, 2011 at 04:34:10PM +0200, Philipp Hahn wrote:
> '+' in strings get translated to ' ' when editing domains.
> While xenDaemonDomainCreateXML() did URL-escape the sexpr,
> xenDaemonDomainDefineXML() did not.
> 
> Remove the explicit urlencode() in xenDaemonDomainCreateXML() and add
> the direct encoding calls to xend_op_ext() because it calls xend_post()
> which uses "Content-Type: application/x-www-form-urlencoded". According
> to <http://www.w3.org/TR/html4/interact/forms.html#h-17.13.4.1> this
> requires all parameters to be url-encoded as specified in rfc1738.
> 
> Notice: virBufferAsprintf(..., "%s=%s", ...) is again replaced by three
> calls to virBufferURIEncodeString() and virBufferAddChar() because '='
> is a "reserved" character, which would get escaped by
> virBufferURIEncodeString(), which - by the way - escapes anything not
> c_isalnum().

  ACK, interesting cleanup too :-)

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel@xxxxxxxxxxxx  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]