Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix boost::network::uri::decode error - out of range because of '%'#553

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
deanberris merged 7 commits intocpp-netlib:0.11-develfromcnagune:0.11-devel-fix-decode-percent
Sep 11, 2015
Merged
Show file tree
Hide file tree
Changes from1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
NextNext commit
rename exception: std::out_of_range
  • Loading branch information
@cnagune
cnagune committedAug 14, 2015
commit99b9eb38e8ebc8edb80ff1c4abbaf35e8cfcd146
4 changes: 2 additions & 2 deletionsboost/network/uri/decode.hpp
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -59,9 +59,9 @@ OutputIterator decode(const InputIterator &in_begin,
OutputIterator out = out_begin;
while (it != in_end) {
if (*it == '%') {
if (++it == in_end) throw std::runtime_error("decoding fail because of '%'");
if (++it == in_end) throw std::out_of_range("out_of_range exception");
value_type v0 = detail::letter_to_hex(*it);
if (++it == in_end) throw std::runtime_error("decoding fail because of '%'");
if (++it == in_end) throw std::out_of_range("out_of_range exception");
value_type v1 = detail::letter_to_hex(*it);
++it;
*out++ = 0x10 * v0 + v1;
Expand Down
2 changes: 1 addition & 1 deletionlibs/network/test/uri/uri_encoding_test.cpp
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -52,5 +52,5 @@ BOOST_AUTO_TEST_CASE(decoding_throw_test) {
const std::string encoded("%");

std::string instance;
BOOST_CHECK_THROW(uri::decoded(encoded), std::runtime_error);
BOOST_CHECK_THROW(uri::decoded(encoded), std::out_of_range);
}

[8]ページ先頭

©2009-2025 Movatter.jp