Hot answers tagged

124 votes
Accepted

Chrome 68 "Not secure" How to make it in red color?

Yes, we do have that option Result The result being all non-HTTPS pages in red color: Setting it up Access internal settings: chrome://flags/ Look for: Mark non-secure origins as non-secure ...
Vlastimil Burián's user avatar
92 votes
Accepted

How do web servers know whether you're using direct IP address access?

To answer your question of how it knows, it has to do with what your browser sends the server. You're right that the system always resolves it to an IP address, but the browser sends the URL you ...
iAdjunct's user avatar
  • 1,632
53 votes

Getting curl to output HTTP status code?

Status code ONLY [0]$ curl -LI http://www.example.org -o /dev/null -w '%{http_code}\n' -s [0]$ 200 All credit to this GIST
mahatmanich's user avatar
53 votes

Why does my browser attempt to download pages from http://clhs.lisp.se instead of viewing them normally?

There is something wrong with the way that website and/or web sever is delivering web pages. This is not a problem on your end but rather something odd on the server side; with either the website ...
Giacomo1968's user avatar
  • 53.6k
52 votes
Accepted

Are there well known HTTP-only sites?

A well-known public HTTP only site will resolve this You can use http://neverssl.com: What? This website is for when you try to open Facebook, Google, Amazon, etc on a wifi network, and ...
DavidPostill's user avatar
  • 155k
47 votes

How do I make a POST request using curl?

If you are lazy, you can get google-chrome or firefox to do all the work for you. Right-click the form you want to submit and select Inspect (or Inspect Element for Firefox). This will open the ...
ccpizza's user avatar
  • 7,558
40 votes
Accepted

What is the difference between Invoke-WebRequest and Invoke-RestMethod?

You can find out by decompiling the Microsoft.PowerShell.Commands.Utility assembly. Basically, Invoke-WebRequest does not deal with parsing the data all that much. With -UseBasicParsing, it does some ...
Daniel B's user avatar
  • 61.6k
39 votes
Accepted

Are HTTP_PROXY, HTTPS_PROXY and NO_PROXY environment variables standard?

I agree with BillThor's statement that This is more a convention than a standard. I don't know the origin of these variables but in case of HTTP on *nix many conventions seem to originate from ...
Piotr Dobrogost's user avatar
36 votes

Can you go to a website by typing the IP address into the address bar?

TL;DR It depends on the server's configuration. A quick positive example is one.one.one.one / 1.1.1.1. I'm assuming you're following the usual lecture on your Computer Networking course about how ...
iBug's user avatar
  • 10.8k
32 votes
Accepted

What protocol is used for downloading files?

Say I download an executable like Pycharm from Jetbrains.com. HTTP was used to deliver contents of the website - is this also used when I download the file? I read that FTP was used but also saw it's ...
u1686_grawity's user avatar
31 votes
Accepted

curl http_code of 000

The response 000 indicates that cURL failed to execute for some reason. In such a case, you should test for cURL exit code rather than making assumptions. See the "Exit Codes" section of the curl ...
Mikkel's user avatar
  • 825
29 votes

How to track url redirects in the browser?

Now, when FireBug is integrated into developer tools you may enable persistent logs by next steps: Open DevTools (F12) Go into Toolbox options (forth icon from right top) Find Common preferences ...
Eugen Konkov's user avatar
24 votes

Can you go to a website by typing the IP address into the address bar?

The IP stack isn't really 'aware' or 'care' about the IP. All DNS does is tell you "this domain name is at this IP". In the 'simplest' sense there's no difference between either scenario - ...
Journeyman Geek's user avatar
  • 128k
23 votes

Can you go to a website by typing the IP address into the address bar?

Call me crazy but none of the current answers contains the word "header", which is the most important part for a web server like Apache, Nginx etc. to resolve the correct site. The host ...
Thomas's user avatar
  • 529
21 votes

How can I make wget rename downloaded files to not include the query string?

I realized after processing a large batch that I should have instructed wget to ignore the query strings. I did not want to do it over again so I made this script which worked for me: # /bin/bash ...
Gregory Wolf's user avatar
21 votes

Getting curl to output HTTP status code?

This is a painful curl --fail limitation. From man curl : -f, --fail (HTTP) Fail silently (no output at all) on server errors But there is no way to get both the non-zero return code AND ...
Lucas Cimon's user avatar
21 votes

Convert HTTP requests to SOCKS5

You can also use Privoxy. Add this line to its config.txt file: forward-socks5 / 127.0.0.1:9050 . (Don't forget the small dot at the end.) Then use the HTTP or HTTPS proxy at 127.0.0.1:8118
Guest's user avatar
  • 211
21 votes

Get modification time of remote file over HTTP in Bash script

The server response does usually have Last-Modified field, you can check it without downloading the file. No need to use -X HEAD, there's a special option -I for that (the -s suppresses progress ...
Hi-Angel's user avatar
  • 506
21 votes

How do web servers know whether you're using direct IP address access?

With the HTTP 1.1 protocol (the prior HTTP 1.0 version has been obsolete for quite some time, so is unlikely to be used by any recent version of a browser), the host header was introduced. For HTTP 1....
moonpoint's user avatar
  • 5,100
21 votes
Accepted

How does browser know which version of HTTP it should use when sending a request?

HTTP/1.x Both HTTP/1.1 and HTTP/1.0 use compatible request formats. After the first request, the server's response will indicate the version it supports, plus headers such as "Connection: keep-...
u1686_grawity's user avatar
18 votes

Are HTTP_PROXY, HTTPS_PROXY and NO_PROXY environment variables standard?

There is no real standard. Different tools interpret these variables similarly but subtly differently. For example the case of the recognised environment variables and the case-precedence varies ...
halloleo's user avatar
  • 343
15 votes

Getting curl to output HTTP status code?

For a POST request, the following worked: curl -w 'RESP_CODE:%{response_code}' -s -X POST --data '{"asda":"asd"}' http://example.com --header "Content-Type:application/json"|grep -o 'RESP_CODE:[1-4][...
zafar142003's user avatar
15 votes
Accepted

How does the protocol "mongodb" work?

To manually interact with it you need a client to speak the protocol. This is what a web browser does, it speaks http/https for you and issues commands (GET, POST etc.) and renders the responses for ...
Adam C's user avatar
  • 2,735
14 votes

How to send an HTTP request for a certain domain name to a specific IP address?

You can use CURL to initiate a request to the server with a custom host header. curl --header "Host:abc.com" xxxx.xxxx.xxxx.xxxx
user738156's user avatar
12 votes
Accepted

Why I use chrome request a site URL do not see Host header?

All HTTP/1.1 request messages must contain a Host header field. Yes, but what you have is not actually an HTTP/1.1 request. You're looking at HTTP/2, where the :authority pseudo-header serves the ...
u1686_grawity's user avatar
11 votes

Convert HTTP requests to SOCKS5

HTTP Proxy to Socks5 Install python-proxy $ pip3 install pproxy $ pproxy -r socks5://127.0.0.1:9150 -vv Usage http://127.0.0.1:8080 https://127.0.0.1:8080
Almog's user avatar
  • 111
11 votes
Accepted

Storing a HTTP POST request in a bookmark or something similar as you would with a GET request

You can create a bookmarklet that uses JavaScript to send a POST request when clicked. The following code sends a POST request with payload foo=bar to https://example.com by appending a form to the ...
raphinesse's user avatar
10 votes
Accepted

Capture Only HTTP traffic in tshark

Use a display filter: tshark -Y http If you need to save the capture, you can run the display filter on the output: tshark -r packetFile.pcap -Y http -w packetFile-http.pcap
Sphinges's user avatar
  • 116
10 votes

What is the difference between Invoke-WebRequest and Invoke-RestMethod?

systemcenterautomation.com did a blog post about this. The conclusion: Invoke-RestMethod is much better at dealing with XML and JSON results, while Invoke-WebRequest is better at dealing with ...
Ohad Schneider's user avatar
10 votes

Why does my browser attempt to download pages from http://clhs.lisp.se instead of viewing them normally?

This funny website return for your page an answer with the following headers: HTTP/1.1 200 OK Content-Type: application/octet-stream Accept-Ranges: bytes Content-Length: 8896 Date: Sat, 21 Sep 2019 ...
harrymc's user avatar
  • 464k

Only top scored, non community-wiki answers of a minimum length are eligible