Shammer's Philosophy

My private adversaria

HTTP

rewrite http-read-line of http://d.hatena.ne.jp/shammer/20160320/p1

In the article Lisp HTTP Client handling chunked responses - Shammerism, I wrote a HTTP client which can handle chunked response. In this article, the function whose name is http-read-line uses do loop, but I would like to rewrite as recur…

Lisp HTTP Client handling chunked responses

I wrote an HTTP client with ClozureCL, and this can handle chunked response. (defparameter *remote-host* "d.hatena.ne.jp") (defparameter *remote-port* 80) (defparameter *client-stream* nil) (defmacro connect-operation (&rest body) `(with-o…

UserCSS

Purpose I discovered a Safari extensions, named UserCSS. This enable to manage css per URL. I launch web server at my localhost, and I would like to apply my own style sheet for only localhost access. This extensions let me enable what I w…

How to check the HTTP header?

The command line tools, curl has a -v option. This is very useful because all HTTP request and response header displays. The response header value is depends on the web server configuration. This is just sample to Debian squeeze apache res…

How to get html required authentication by curl?

The command "curl" has a -c option and -b option. The option -c makes cookie filed into local disk. And the option -b is used the cookie file to connect web server. Then, the option -d enables to send post data. So, the following steps ena…

HTTP Multipart Request

The most easiest way to test multipart form-data is defining enctype="multipart/form-data" as form attribute. Sample is below. <form method="post" name="f" action="cgi-bin/sample.cgi" onsubmit="return sendData(this)" enctype="multipart/form-data"> <input type="text" name="field1" value=""></input> <…

change cookie by curl command

What is curl? This means cURL. Maybe URL client. This command has a lot of options which enable to control http access in detail. Most Basic command The most basic curl command is below. curl http://www.example.com/This command only get an…

HTTP Request Sample 2010202

telnet でHTTP Request を投げる際のサンプルを用意。 一番基本的なもの。 GET / HTTP/1.1 Host: X.X.X.X Keep-Alive版。 GET / HTTP/1.1 Host: X.X.X.X Connection: Keep-Alive 今後増やしていきたいが、とりあえずこれだけ。

一番簡単なHTTPリクエスト

現在使われているHTTPのバージョンは、1.0と1.1。1.0も使われているっていっても、大半は1.1だろう。それぞれのバージョンで、リクエストやレスポンスのヘッダーや、実装すべき機能の差分がある。当然だけれども、後に決められた1.1の方が複雑で、HTTP 1.0 …