recentpopularlog in

kme : http   98

« earlier  
HTTP range requests - HTTP | MDN | https://developer.mozilla.org/
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 http://i.imgur.com/z4d4kWk.jpg

# result:
# HTTP/1.1 200 OK
# ...
# Accept-Ranges: bytes
# Content-Length: 146515
</code>
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: https://www.thegeekdiary.com/how-to-configure-docker-to-use-proxy/ (Method 2).

<code class="language-json">{
"proxies":
{
"default":
{
"httpProxy": "http://127.0.0.1:3001",
"httpsProxy": "http://127.0.0.1:3001",
"noProxy": "*.test.example.com,.example2.com"
}
}
}</code>
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 | https://unix.stackexchange.com/
<code class="language-bash">
curl --write-out '%{http_code}' --silent --output /dev/null http://example.com
</code>
webdevel  webmaster  curl  http  statuscode  shellscripting  solution 
february 2019 by kme
cortesi/devd: A local webserver for developers | https://github.com/
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 | https://stackoverflow.com/
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 CGI.pm.
http  get  post  serialization  webdevel  debugging  reference 
august 2018 by kme
openssl s_client using a proxy - Stack Overflow | https://stackoverflow.com/


You can use proxytunnel:

proxytunnel -p yourproxy:8080 -d www.google.com:443 -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 | https://superuser.com/
Protocol-less URLs are now seen as an "anti-pattern" (https://www.paulirish.com/2010/the-protocol-relative-url/), 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="//www.google.com/js/gweb/analytics/autotrack.js"></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 | https://stackoverflow.com/
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 | https://serverfault.com/
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
TL;DR

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: http://httpd.apache.org/docs/2.4/mod/mod_proxy.html#forwardreverse
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.

example.php:

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

Result or 3 executions:

bart@hal9k:~> cat /tmp/track.txt
127.0.0.1 2009-04-21T09:50:02+02:00
127.0.0.1 2009-04-21T09:50:05+02:00
127.0.0.1 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