Skip to content
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

Non-HTML documents wrapped in HTML #6

Open
robrwo opened this issue Feb 19, 2021 · 1 comment
Open

Non-HTML documents wrapped in HTML #6

robrwo opened this issue Feb 19, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@robrwo
Copy link
Owner

robrwo commented Feb 19, 2021

WWW::Mechanize::Chrome seems to be wrapping non-HTML documents in HTML. See Corion/WWW-Mechanize-Chrome#55

@robrwo robrwo added the bug Something isn't working label Feb 19, 2021
@robrwo
Copy link
Owner Author

robrwo commented Feb 19, 2021

This might be fixed by using $res->content instead of $mech->content but this doesn't always get the body without setting the wait attribute to a non-zero value. According to the WWW::Mechanize::Chrome documentation for the get method:

Note that the returned HTTP::Response object gets the response body filled in lazily, so you might have to wait a moment to get the response body from the result. This is a premature optimization and later releases of WWW::Mechanize::Chrome are planned to fetch the response body immediately when accessing the response body.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant