Skip to content
This repository has been archived by the owner on May 18, 2022. It is now read-only.

Problem with downloading language files #141

Open
sribo23 opened this issue Feb 24, 2015 · 3 comments
Open

Problem with downloading language files #141

sribo23 opened this issue Feb 24, 2015 · 3 comments
Labels

Comments

@sribo23
Copy link

sribo23 commented Feb 24, 2015

Due to a 302 redirect the language files can not be downloaded. The files are created but the content is an html file with the message '302 Found'.

@wesleytodd
Copy link
Owner

Can you be more specific? What url is it trying to download? Are there error messages? Stuff like that.

@sribo23
Copy link
Author

sribo23 commented Mar 10, 2015

Sorry for the late reply!
For an example, if you would do a curl request:
curl http://translate.wordpress.org/projects/wp/dev/de/default/export-translations?format=mo
then you would get this result:

<html>
<head><title>302 Found</title></head>
<body bgcolor="white">
<center><h1>302 Found</h1></center>
<hr><center>nginx</center>
</body>
</html>

But if you would do it again like so:
curl -L http://translate.wordpress.org/projects/wp/dev/de/default/export-translations?format=mo
then you will get the result. The 302 redirect will be accepted with this -L flag. This shows also that the file is behind a 302 redirect but http.get() method in https://github.com/wesleytodd/YeoPress/blob/master/util/wordpress.js:55 does not follow the redirect as curl does.

@wesleytodd
Copy link
Owner

Yeah, we should convert that to use request instead of the core http module. Marking this as a bug. Thanks!

If you are interested in getting it working it is as simple as using request to make the request. I would accept this PR and publish right away if you make it.

@wesleytodd wesleytodd added the bug label Apr 19, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants