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

Cant install Apache #2334

Closed
codebk1 opened this issue Jun 26, 2018 · 9 comments
Closed

Cant install Apache #2334

codebk1 opened this issue Jun 26, 2018 · 9 comments

Comments

@codebk1
Copy link

codebk1 commented Jun 26, 2018

Installing the latest Apache fails with a 308:

Installing 'apache' (2.4.33) [64bit]
Serwer zdalny zwrócił błąd: (308) Permanent Redirect.
URL https://www.apachelounge.com/download/VC15/binaries/httpd-2.4.33-win64-VC15.zip is not valid
@r15ch13
Copy link
Member

r15ch13 commented Jun 26, 2018

Interesting. It works in the browser, but curl, aria2 and [Net.Webrequest] fail because of redirect to localhost. 😕

> GET /download/VC15/binaries/httpd-2.4.33-win64-VC15.zip.txt HTTP/1.1
> Host: www.apachelounge.com
> User-Agent: curl/7.55.1
> Accept: */*
>
< HTTP/1.1 308 Permanent Redirect
< Date: Tue, 26 Jun 2018 14:26:21 GMT
< Server: Apache/2.4.34-dev (Win64)
< X-Frame-Options: SAMEORIGIN
< Location: http://localhost/
< Content-Length: 227
< Content-Type: text/html; charset=iso-8859-1
<
* Ignoring the response-body
* Connection #0 to host www.apachelounge.com left intact
* Issue another request to this URL: 'http://localhost/'
*   Trying ::1...
* TCP_NODELAY set
* Connected to localhost (::1) port 80 (#1)
> GET / HTTP/1.1
> Host: localhost
> User-Agent: curl/7.55.1
> Accept: */*
>
< HTTP/1.1 404 Not Found
< Content-Type: text/plain; charset=utf-8
< Server: Caddy
< X-Content-Type-Options: nosniff
< Date: Tue, 26 Jun 2018 14:26:25 GMT
< Content-Length: 51
<
404 Site localhost is not served on this interface
* Connection #1 to host localhost left intact

@r15ch13
Copy link
Member

r15ch13 commented Jun 26, 2018

It seems PowerShell gets blocked by their server:
Changing the UserAgent from
Scoop/1.0 (+http://scoop.sh/) PowerShell/5.1 (Windows NT 10.0; Win64; x64; Desktop)
to
Scoop/1.0 (+http://scoop.sh/) PowerHell/5.1 (Windows NT 10.0; Win64; x64; Desktop)
works...
Same goes for the curl UserAgent curl/7.55.1, wurl/7.55.1 works.

@r15ch13
Copy link
Member

r15ch13 commented Jul 4, 2018

UserAgents with PowerShell/curl/wget are blocked by apachelounge.com
https://www.apachelounge.com/viewtopic.php?t=8018

Possible options:

  • Remove PowerShell from Scoops UserAgent (meh, would like to keep it)
  • Overwrite UserAgent when apachelounge.com gets used (messy code)
  • Add useragent property to schema.json

@rasa
Copy link
Member

rasa commented Jul 4, 2018

+1 to adding a useragent or user_agent property.

@chawyehsu
Copy link
Member

+1 add useragent property.

@r15ch13
Copy link
Member

r15ch13 commented Jul 5, 2018

All solutions are bad. 😭
Adding a property to schema.json requires a lot of changes to all dl_*() and find_*() functions from install.ps1 and autoupdate.ps1
Because none of these functions get the JSON object as a parameter... 😢

@rasa
Copy link
Member

rasa commented Jul 5, 2018

PowerHell it is, then. Or how ‘bout Power-Shell or PoweredShell?

@chawyehsu
Copy link
Member

A deformed user-agent word is a worse hack I think. Obviously huge changes in core functionality/files is really a painful process. Need a complete design.

@r15ch13
Copy link
Member

r15ch13 commented Jul 5, 2018

"Need a complete design." Yes!

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

No branches or pull requests

4 participants