You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mesos.apache.org by Benjamin Hindman <be...@berkeley.edu> on 2012/10/09 00:10:58 UTC
Re: Review Request: HTTP Percent Encoding / Decoding.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/7272/#review12246
-----------------------------------------------------------
Ship it!
third_party/libprocess/include/process/http.hpp
<https://reviews.apache.org/r/7272/#comment25986>
s/encodeURI/encode/
third_party/libprocess/include/process/http.hpp
<https://reviews.apache.org/r/7272/#comment25987>
s/decodeURI/decode/
third_party/libprocess/include/process/http.hpp
<https://reviews.apache.org/r/7272/#comment25988>
std::istringstream in(s.substr(i + 1, 2));
long l;
in >> std::hex >> l;
CHECK(... 'l' fits in a char ...);
out << static_cast<char>(l);
- Benjamin Hindman
On Sept. 28, 2012, 9:21 p.m., Ben Mahler wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/7272/
> -----------------------------------------------------------
>
> (Updated Sept. 28, 2012, 9:21 p.m.)
>
>
> Review request for mesos, Benjamin Hindman and Vinod Kone.
>
>
> Description
> -------
>
> We currently don't decode percent-encoded queries!
>
>
> Diffs
> -----
>
> src/tests/files_tests.cpp 17d284b
> third_party/libprocess/include/process/http.hpp d680261
> third_party/libprocess/src/decoder.hpp f582faf
> third_party/libprocess/src/tests.cpp 1df7ae6
>
> Diff: https://reviews.apache.org/r/7272/diff/
>
>
> Testing
> -------
>
> Tests for encoding / decoding.
>
>
> Thanks,
>
> Ben Mahler
>
>
Re: Review Request: HTTP Percent Encoding / Decoding.
Posted by Ben Mahler <be...@gmail.com>.
> On Oct. 8, 2012, 10:10 p.m., Benjamin Hindman wrote:
> > third_party/libprocess/include/process/http.hpp, line 255
> > <https://reviews.apache.org/r/7272/diff/2/?file=160814#file160814line255>
> >
> > std::istringstream in(s.substr(i + 1, 2));
> > long l;
> > in >> std::hex >> l;
> > CHECK(... 'l' fits in a char ...);
> > out << static_cast<char>(l);
> >
Changed, but it seems uglier, although probably more readable..
- Ben
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/7272/#review12246
-----------------------------------------------------------
On Sept. 28, 2012, 9:21 p.m., Ben Mahler wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/7272/
> -----------------------------------------------------------
>
> (Updated Sept. 28, 2012, 9:21 p.m.)
>
>
> Review request for mesos, Benjamin Hindman and Vinod Kone.
>
>
> Description
> -------
>
> We currently don't decode percent-encoded queries!
>
>
> Diffs
> -----
>
> src/tests/files_tests.cpp 17d284b
> third_party/libprocess/include/process/http.hpp d680261
> third_party/libprocess/src/decoder.hpp f582faf
> third_party/libprocess/src/tests.cpp 1df7ae6
>
> Diff: https://reviews.apache.org/r/7272/diff/
>
>
> Testing
> -------
>
> Tests for encoding / decoding.
>
>
> Thanks,
>
> Ben Mahler
>
>