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

response header sometimes doesn't give a content-length. #456

Merged
merged 4 commits into from
Jun 22, 2019

Conversation

candh
Copy link
Contributor

@candh candh commented Jun 20, 2019

we want to quit with an error before its passed on to parseInt.

I gave annie a openload.co link, it tried to download it directly and gave me this error

$ annie https://openload.co/f/kKNtu5AZ3mE/Monty_Python_e_il_Sacro_Graal.mp4

annie doesn't support this URL right now, but it will try to download it directly
Downloading https://openload.co/f/kKNtu5AZ3mE/Monty_Python_e_il_Sacro_Graal.mp4 error:
strconv.ParseInt: parsing "": invalid syntax

My mistake, i noticed the "download" button on the site afterwards. Content-Length doesn't get set on openload.co links. So, we print a (somewhat) nicer error and quit.

…uit with an error before its passed on to parseInt
@candh
Copy link
Contributor Author

candh commented Jun 20, 2019

hmm, why did the test fail? 😢

Copy link
Owner

@iawia002 iawia002 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

basically LGTM, I will fix the tests later

request/request.go Outdated Show resolved Hide resolved
@candh
Copy link
Contributor Author

candh commented Jun 22, 2019

yep, its good now. i think...

Copy link
Owner

@iawia002 iawia002 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@iawia002 iawia002 merged commit edfe571 into iawia002:master Jun 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants