recentpopularlog in

kme : http   98

« earlier  
HTTP range requests - HTTP | MDN |
If the Accept-Ranges is present in HTTP responses (and its value isn't "none"), the server supports range requests. You can check this by issuing a HEAD request with cURL, for example.
<code class="language-bash">
curl -I

# result:
# HTTP/1.1 200 OK
# ...
# Accept-Ranges: bytes
# Content-Length: 146515
curl  http  rangerequest  partialdownloads  resume  webdevel  solution  reference 
7 weeks ago by kme
Configure Docker to use a proxy server | Docker Documentation
This didn't work, but this did: (Method 2).

<code class="language-json">{
"httpProxy": "",
"httpsProxy": "",
"noProxy": "*,"
docker  proxy  http  maybesolution 
9 weeks ago by kme
kayex/http-codes - Packagist
Small PHP library for easily accessing HTTP Status Codes.
php  library  http  statuscode  webdevel 
may 2019 by kme
GitHub - krowinski/http-status-codes: PHP List of HTTP status codes, messages and description for them.
PHP List of HTTP status codes, messages and description for them. - krowinski/http-status-codes
php  http  webdevel  statuscodes  library 
may 2019 by kme
Hide curl output - Unix & Linux Stack Exchange |
<code class="language-bash">
curl --write-out '%{http_code}' --silent --output /dev/null
webdevel  webmaster  curl  http  statuscode  shellscripting  solution 
february 2019 by kme
cortesi/devd: A local webserver for developers |
A local webserver for developers. Contribute to cortesi/devd development by creating an account on GitHub.
webdevel  http  httpd  server  webserver  cli  golang 
january 2019 by kme
How are parameters sent in an HTTP POST request? - Stack Overflow |
It /seems/ like the multi-value select boxes can be encoded by giving the variable name as 'fieldname[]'. Not positive, since I couldn't get it working quite right with Perl
http  get  post  serialization  webdevel  debugging  reference 
august 2018 by kme
openssl s_client using a proxy - Stack Overflow |

You can use proxytunnel:

proxytunnel -p yourproxy:8080 -d -a 7000

and then you can do this:

openssl s_client -connect localhost:7000 -showcerts

Hope this can help you!
proxy  debugging  http  https  webdevel  sysadmin  webmaster  ssl  cert  cacert  solution 
december 2017 by kme
syntax - In a URL, what is // for? - Super User |
Protocol-less URLs are now seen as an "anti-pattern" (, but anyway, this was interesting.

More recently, it could be argued that the double slash does have a role. Google recommend (to avoid accidentally calling insecure content from a secure page, for example) omitting the protocol from embedded resources (stylesheets, js etc), like this

<script src="//"></script>

So it is now apparent that such a protocol-less URL is a fully qualified URL and not a relative URL (which would begin with a single slash).
interesting  http  url  protocol  theweb 
november 2017 by kme
perl - CPAN first launch (Proxy Configuration) - Stack Overflow |
See also:

which has this actual solution:
Try these:

Before running cpan: export -n http_proxy
In the cpan shell: o conf http_proxy ''
To save your modified cpan config: o conf commit

That will disable any http proxy CPAN is configured to use.
cpan  http  proxy  annoyance  errormessage 
october 2017 by kme
perl - Force CPAN to download via HTTP - Server Fault |
Try these:

Before running cpan: export -n http_proxy
In the cpan shell: o conf http_proxy ''
To save your modified cpan config: o conf commit

That will disable any http proxy CPAN is configured to use.
perl  cpan  http  proxy  annoyance  fuckina  solution 
october 2017 by kme
cors - What exactly does the Access-Control-Allow-Credentials header do? - Stack Overflow
Indicates whether or not the response to the request can be exposed when the credentials flag is true.
cors  webdevel  webmaster  security  http 
september 2017 by kme
http - application/x-www-form-urlencoded or multipart/form-data? - Stack Overflow

The moral of the story is, if you have binary (non-alphanumeric) data (or a significantly sized payload) to transmit, use multipart/form-data. Otherwise, use application/x-www-form-urlencoded.

According to the specification:

[Reserved and] non-alphanumeric characters are replaced by `%HH', a percent sign and two hexadecimal digits representing the ASCII code of the character

That means that for each non-alphanumeric byte that exists in one of our values, it's going to take three bytes to represent it. For large binary files, tripling the payload is going to be highly inefficient.
questions  http  post  html  forms  webdevel  answered 
february 2017 by kme
When to use the PATCH method - The RESTful cookbook
TLDR: Patch is Update, PUT is Replace.
You can delete data with PUT, you can't with PATCH.
http  patch  rest  bestpractices  webdevel  api 
february 2017 by kme
webserver - Difference between proxy server and reverse proxy server - Stack Overflow

A pair of simple definitions would be

Forward Proxy: Acting on behalf of a requestor (or service consumer)

Reverse Proxy: Acting on behalf of service/content producer.

See also:
networking  proxy  apache  http  terminology  web  reference  solution  explained 
january 2015 by kme
How to make a redirect in PHP? - Stack Overflow
Use header() function to send HTTP Location header:

header('Location: '.$newURL);

Contrary to some think, die() has nothing to do with redirection. Use it only if you want to redirect instead of normal execution.


header('Location: static.html');
$fh = fopen('/tmp/track.txt','a');
fwrite($fh, $_SERVER['REMOTE_ADDR'].' '.date('c')."\n");

Result or 3 executions:

bart@hal9k:~> cat /tmp/track.txt 2009-04-21T09:50:02+02:00 2009-04-21T09:50:05+02:00 2009-04-21T09:50:08+02:00

Resuming — obligatory die()/exit() is some urban legend, that has nothing to do with actual PHP. Has nothing to do with client "respecting" Location: header. Sending header does not stop PHP execution, regardless of client used.
php  webmaster  webdevel  dammitbrain  redirect  http 
december 2014 by kme
php - Get URL query string - Stack Overflow
$_SERVER['QUERY_STRING'] contains the data that you are looking for.
php  solution  dammitbrain  cgi  http  webdevel 
october 2014 by kme
« earlier      
per page:    204080120160

Copy this bookmark:

to read