Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8203117
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T07:26:08+00:00 2026-06-07T07:26:08+00:00

Wget can’t detect filename when 301/302 redirections. For example, to download the MySQL source

  • 0

Wget can’t detect filename when 301/302 redirections. For example, to download the MySQL source code from http://www.mysql.com/downloads/mirror.php?id=408580

wget http://www.mysql.com/get/Downloads/MySQL-5.5/mysql-5.5.25a-linux2.6-x86_64.tar.gz/from/http://cdn.mysql.com/

The file will be save as index.html

wget http://cdn.mysql.com/Downloads/MySQL-5.5/mysql-5.5.25a-linux2.6-x86_64.tar.gz

The file will be save as mysql-5.5.25a-linux2.6-x86_64.tar.gz

but the first url is only a redirection for second URL as it is shown in:

curl -I http://www.mysql.com/get/Downloads/MySQL-5.5/mysql-5.5.25a-linux2.6-x86_64.tar.gz/from/http://cdn.mysql.com/

HTTP/1.1 302 Found
Date: Mon, 09 Jul 2012 06:11:50 GMT
Server: Apache/2.2
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Set-Cookie: mirror=http%3A%2F%2Fcdn.mysql.com%2F; expires=Sat, 08-Jul-2017 06:11:50 GMT; path=/
Location: http://cdn.mysql.com/Downloads/MySQL-5.5/mysql-5.5.25a-linux2.6-x86_64.tar.gz
Content-Encoding: gzip
Vary: Accept-Encoding
Content-Type: text/html; charset=utf-8

How can wget save http://www.mysql.com/get/Downloads/MySQL-5.5/mysql-5.5.25a-linux2.6-x86_64.tar.gz/from/http://cdn.mysql.com/ as “.tar.gz” automatically (without using -O argument)?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T07:26:10+00:00Added an answer on June 7, 2026 at 7:26 am

    Try the following command:

    wget --content-disposition http://www.mysql.com/get/Downloads/MySQL-5.5/mysql-5.5.25a-linux2.6-x86_64.tar.gz/from/http://cdn.mysql.com/
    

    When this is set to on, the experimental (not fully-functional) support for “Content-Disposition” header is enabled. This can result in extra round-trips to the server for a “HEAD” request and is known to suffer from a few bugs, which is why it is not currently enabled by default.

    This option is useful for some file-downloading CGI programs that use “Content-Disposition” header to describe what the name of a downloaded file should be.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Try to download this page: http://www.4shared.com/get/B4AgMkcw/cookies.html I can use wget/firefox to get the whole
How can I get exit code of wget from the subshell process? So, main
How do I can download the default web page from a domain using wget
I want to download a list of web pages. I know wget can do
I can't get wget to work when called from PHP through exec() . The
I want to run wget as follows shell_exec('wget 'http://somedomain.com/somefile.mp4''); sleep(20); continue my code... What
when I type wget http://yahoo.com:80 on unix shell. Can some one explain me what
I need to retrieve some info from web. For example, I can visit weather.com
How can I stop commends like wget -r, wget to prevent downloading images from
I'm using the wget command from within php to download a css stylesheet and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.