GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — unit test faild,because of "http://www.boost.org" return "301 Moved Permanently" · Issue #836 · cpp-netlib/cpp-netlib

unit test faild,because of "http://www.boost.org" return "301 Moved Permanently" #836

New issue
Copy link
New issue
Copy link
Closed
Closed
unit test faild,because of "http://www.boost.org" return "301 Moved Permanently"#836
Copy link

Description

@limenghua
limenghua
opened on Apr 28, 2018
Issue body actions

OS: CentOS7.4 x64
gcc (GCC) 5.3.1 20160406 (Red Hat 5.3.1-6)
boost 1.66
cpp-netlib:0.12.0-final

tests]$ ./cpp-netlib-http-client_get_streaming_test
cpp-netlib-0.12.0-final/libs/network/test/http/client_get_streaming_test.cpp:41: Failure
Expected: 200u
Which is: 200
To be equal to: response.status()
Which is: 301
/home/limenghua/Downloads/cpp-netlib-0.12.0-final/libs/network/test/http/client_get_streaming_test.cpp:42: Failure
Expected: "OK"
To be equal to: response.status_message()
Which is: "Moved Permanently"

Activity

  1. umennel commented on May 3, 2018

    @umennel
    umennel
    on May 3, 2018
    More actions

    Hi @limenghua, in the 0.13 release, we used to connect to boost.org in some of the tests because the site would support chunked transfer encoding. But now they don't allow unencrypted connections any more. We need to find another source for testing chunked transfer encoding. But since you are using the 0.12 release, chunked transfer encoding is not available anyway, so I guess any site allowing unencrypted connections will do.

  2. deanberris commented on May 8, 2018

    @deanberris
    deanberris
    on May 8, 2018
    Member
    More actions

    Yeah, this one's tricky -- we definitely should update the test to either:

    1. Use HTTPS and chunked transfer encoding.

    2. Set up our own server to make HTTP requests to.

    While I'm not a great fan of solution 2, that might be the easiest thing to do in this case.

  3. yhager commented on May 14, 2018

    @yhager
    yhager
    on May 14, 2018
    More actions

    The test passes for me on 0.13-release branch if I change http to https:

    --- a/libs/network/test/http/client_get_streaming_test.cpp
    +++ b/libs/network/test/http/client_get_streaming_test.cpp
    @@ -26,7 +26,7 @@ struct body_handler {
     TYPED_TEST_CASE(HTTPClientTest, ClientTypes);
     
     TYPED_TEST(HTTPClientTest, GetStreamingTest) {
    -  typename TypeParam::request request("http://www.boost.org");
    +  typename TypeParam::request request("https://www.boost.org");
       typename TypeParam::response response;
       typename TypeParam::string_type body_string;
       typename TypeParam::string_type dummy_body;
  4. deanberris commented on May 15, 2018

    @deanberris
    deanberris
    on May 15, 2018
    Member
    More actions

    Cool -- can you send a pull request with that change @yhager?

  5. deanberris
    closed this as completedon May 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.