Curl detection of redirect


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Curl detection of redirect
# 1  
Old 02-24-2017
Curl detection of redirect

This URL:

Internet Archive Wayback Machine

..will redirect to this URL when using a browser:

https://web.archive.org/web/20140110...desformat=html

But when accessing the first URL with curl (or wget) there is no information about the redirect and it ends up a 404. Can the redirect information be obtained somewhere or somehow from the command line such as with curl or wget? I've looked at the headers and HTML body with no luck and can't figure out where the browser obtains the redirect URL from.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Curl/wget shell script to follow redirect.

Hello eveyone. I would like to create a simple batch with curl (or wget) to download a URL but the URL I can only download from the browser and not from shell because curl and wget won't follow the 301 redirect which I get :confused: I tried with curl -L but no luck. I want to hear your opinion.... (5 Replies)
Discussion started by: accolito
5 Replies

2. Programming

Parallel Processing Detection and Program Return Value Detection

Hey, for the purpose of a research project I need to know if a specific type of parallel processing is being utilized by any user-run programs. Is there a way to detect whether a program either returns a value to another program at the end of execution, or just utilizes any form of parallel... (4 Replies)
Discussion started by: azar.zorn
4 Replies

3. Shell Programming and Scripting

Download using curl and redirect question_please help

Basically I am needing to Download (using curl) in the background some data from(link here), with stderr redirected to /dev/null, to a file named taxcode I was doing this, curl & http:// name here/download/pls/Title_26.txt 2> /dev/null > taxcode but the results were not what I was after. ... (1 Reply)
Discussion started by: santod
1 Replies

4. AIX

NFS mount detection

Hi, I have a handy script in Linux, part of which checks for the presence of nfs mounts, using the information in /proc/mounts. Is there a suitable command or file in AIX that could be used in a similar way? Many thanks in advance (1 Reply)
Discussion started by: SDG
1 Replies

5. Shell Programming and Scripting

NAT detection

hellou, can anybody help me with nat detection in real time ? i prefer some detection script because i try some nat detection program's for example p0f or i'm using tcpdump, but i would get contain of specific packet. Some ideas? (1 Reply)
Discussion started by: TheTechnic
1 Replies

6. Shell Programming and Scripting

key detection in a script

Heloo every one I want to write a script that detects a key press and mouse click and movement,but I dont know how. The second one is I want to run myscript without writing the shell ie not "sh script.sh" but "script.sh" Can you help me out of here? Thanks in advance. (9 Replies)
Discussion started by: enoch99
9 Replies

7. UNIX for Advanced & Expert Users

boot up detection for linux

Hello, I was wondering is there a specific process I could look for to tell if my suse linux machine is still booting up. I have a monitor process and it's detecting problems with processes because I think the machine is still booting up and has yet to start everything up. Thanks for any help. (2 Replies)
Discussion started by: benefactr
2 Replies

8. IP Networking

modem detection

How to get information that where is my modem configured in /dev. I have two modems configured in my device .. one is USB and other is PCI modem.. USB is detected as /dev/USB0. but how to see about PCI modem? (0 Replies)
Discussion started by: s123.radha
0 Replies

9. UNIX for Dummies Questions & Answers

virus detection

IS there virus software for unix? I worked in a Solaris environment and dont remember having anything. I also ask because the current enviroment i am working on is Microsoft and they argue that they do not use unix because of virus detection. Any input would be greatly appreciated. (1 Reply)
Discussion started by: pbonilla
1 Replies
Login or Register to Ask a Question
CURLOPT_DEFAULT_PROTOCOL(3)				     curl_easy_setopt options				       CURLOPT_DEFAULT_PROTOCOL(3)

NAME
CURLOPT_DEFAULT_PROTOCOL - default protocol to use if the URL is missing a scheme name SYNOPSIS
#include <curl/curl.h> CURLcode curl_easy_setopt(CURL *handle, CURLOPT_DEFAULT_PROTOCOL, char *protocol); DESCRIPTION
This option tells libcurl to use protocol if the URL is missing a scheme name. Use one of these protocol (scheme) names: dict, file, ftp, ftps, gopher, http, https, imap, imaps, ldap, ldaps, pop3, pop3s, rtsp, scp, sftp, smb, smbs, smtp, smtps, telnet, tftp An unknown or unsupported protocol causes error CURLE_UNSUPPORTED_PROTOCOL when libcurl parses a schemeless URL. Parsing happens when curl_easy_perform(3) or curl_multi_perform(3) is called. The protocols supported by libcurl will vary depending on how it was built. Use curl_version_info(3) if you need a list of protocol names supported by the build of libcurl that you are using. This option does not change the default proxy protocol (http). Without this option libcurl would make a guess based on the host, see CURLOPT_URL(3) for details. The application does not have to keep the string around after setting this option. DEFAULT
NULL (make a guess based on the host) PROTOCOLS
All EXAMPLE
curl = curl_easy_init(); if(curl) { /* set a URL without a scheme */ curl_easy_setopt(curl, CURLOPT_URL, "example.com"); /* set the default protocol (scheme) for schemeless URLs */ curl_easy_setopt(curl, CURLOPT_DEFAULT_PROTOCOL, "https"); /* Perform the request */ curl_easy_perform(curl); } AVAILABILITY
Added in 7.45.0 RETURN VALUE
CURLE_OK if the option is supported. CURLE_OUT_OF_MEMORY if there was insufficient heap space. CURLE_UNKNOWN_OPTION if the option is not supported. SEE ALSO
CURLOPT_URL(3), libcurl 7.54.0 December 21, 2016 CURLOPT_DEFAULT_PROTOCOL(3)