Skip to content

Loading…

wgetFile does not handle 301 redirects on RepoURL #4

Closed
sandeepshetty opened this Issue · 2 comments

2 participants

@sandeepshetty

The git_http_client.php example uses a http RepoURL (http://github.com/crodas/php-git.git) that returns a 301 response to redirect to the https URL which is not handled by wgetFile (GitHub redirects http requests to https).

Error:
Alright!, you found a bug, please report it Page not found http://github.com/crodas/php-git.git/HEAD

HTTP Request and Response:
GET /crodas/php-git.git/HEAD HTTP/1.1
Host: github.com

HTTP/1.1 301 Moved Permanently
Server: nginx/0.7.67
Date: Mon, 09 May 2011 21:19:07 GMT
Content-Type: text/html
Content-Length: 185
Connection: keep-alive
Location: https://github.com/crodas/php-git.git/HEAD

@crodas
Owner

Checking now, perhaps tomorrow I'll upload a patch.

@crodas crodas closed this
@crodas crodas reopened this
@sandeepshetty

I've sent a pull request with the patch: #5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.