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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Receiving a cluttered http body #86

Closed
viric opened this Issue Jan 27, 2012 · 5 comments

Comments

Projects
None yet
4 participants
@viric

viric commented Jan 27, 2012

I'm trying this example:

using namespace boost::network;
using namespace boost::network::http;

int main()
{
    client::request request_("http://www.boost.org/");
    request_ << header("Connection", "close");
    client client_;
    client::response response_ = client_.get(request_);
    std::string bodyx = body(response_);

    std::cout << bodyx;
}

And I'm getting a cluttered body like this with 0.9.2:

38b
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
  <meta name="generator" content=
  "HTML Tidy for Windows (vers 1st November 2003), see www.w3.org" />

  <title>Boost C++ Libraries</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <link rel="icon" href="/favicon.ico" type="image/ico" />
  <link rel="stylesheet" type="text/css" href="/style-v2/section-welcome.css" />
  <!--[if IE 7]> <style type="text/css"> body { behavior: url(/style-v2/csshover3.htc); } </style> <![endif]-->
  <meta name="google-site-verification" content="mpr2HgFpodnbF_8fv4qXd9roIClVwtX3C-Kd3F6r61w" />
</head>

<!--
Note: Editing website content is documented at:
http://www.boost.org/development/website_updating.html
-->

<body>
  <div id="heading">

30c
<div class="heading-inner">
  <div class="heading-placard"></div>
....

What are these 38c, 30c, ... ?

@smitsyn

This comment has been minimized.

Show comment
Hide comment
@smitsyn

smitsyn Jan 28, 2012

That is a chunked content. See for header "Transfer-Encoding: chunked"

smitsyn commented Jan 28, 2012

That is a chunked content. See for header "Transfer-Encoding: chunked"

@viric

This comment has been minimized.

Show comment
Hide comment
@viric

viric Jan 28, 2012

Ah, I didn't know. Does cppnetlib handle this, so the content can appear clean?

Thank you.

viric commented Jan 28, 2012

Ah, I didn't know. Does cppnetlib handle this, so the content can appear clean?

Thank you.

@deanberris

This comment has been minimized.

Show comment
Hide comment
@deanberris

deanberris Jan 30, 2012

Member

Actually this is a known bug. Please try the 0.9-devel branch to see if this has already been fixed.

Member

deanberris commented Jan 30, 2012

Actually this is a known bug. Please try the 0.9-devel branch to see if this has already been fixed.

@skystrife

This comment has been minimized.

Show comment
Hide comment
@skystrife

skystrife Feb 27, 2013

I think PR #217 will fix this.

skystrife commented Feb 27, 2013

I think PR #217 will fix this.

@deanberris

This comment has been minimized.

Show comment
Hide comment
@deanberris

deanberris Aug 5, 2013

Member

I think this is already fixed in 0.10.x -- closing now.

Member

deanberris commented Aug 5, 2013

I think this is already fixed in 0.10.x -- closing now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment