<feed xmlns='http://www.w3.org/2005/Atom'>
<title>pakakeh.go/lib/http/testdata/server/range, branch dev</title>
<subtitle>Collections of packages and tools for working with Go programming language.</subtitle>
<id>http://git.kilabit.info/pakakeh.go/atom?h=dev</id>
<link rel='self' href='http://git.kilabit.info/pakakeh.go/atom?h=dev'/>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/'/>
<updated>2026-01-15T10:26:33Z</updated>
<entry>
<title>all: convert license and copyright to use SPDX identifiers</title>
<updated>2026-01-15T10:26:33Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2026-01-15T10:14:54Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=7db8c302e1396eda40cd6a1e57f58ed791448556'/>
<id>urn:sha1:7db8c302e1396eda40cd6a1e57f58ed791448556</id>
<content type='text'>
With help of spdxconv tool [1], we able to bulk update all files license
and copyright format to comply with SPDX formats.

[1] https://kilabit.info/project/spdxconv/
</content>
</entry>
<entry>
<title>lib/http: refactoring Range request, limit content served by server</title>
<updated>2024-01-23T17:07:18Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2024-01-18T20:39:50Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=eb2b4dbdeceb663b1ce29bc08cd5446ecf4c1f07'/>
<id>urn:sha1:eb2b4dbdeceb663b1ce29bc08cd5446ecf4c1f07</id>
<content type='text'>
When server receive,

	GET /big
	Range: bytes=0-

and the requested resources is quite larger, where writing all content of
file result in i/o timeout, it is best practice [1][2] if the server
write only partial content and let the client continue with the
subsequent Range request.

In the above case, the server should response with,

	HTTP/1.1 206 Partial content
	Content-Range: bytes 0-&lt;limit&gt;/&lt;size&gt;
	Content-Length: &lt;limit&gt;

Where limit is maximum packet that is reasonable [3] for most of the
client.
In this server we choose 8MB as limit.

[1]: https://stackoverflow.com/questions/63614008/how-best-to-respond-to-an-open-http-range-request
[2]: https://bugzilla.mozilla.org/show_bug.cgi?id=570755
[3]: https://docs.aws.amazon.com/whitepapers/latest/s3-optimizing-performance-best-practices/use-byte-range-fetches.html
</content>
</entry>
<entry>
<title>lib/http: add support for HTTP Range in Server</title>
<updated>2023-03-12T04:35:19Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2023-03-11T08:51:03Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=3c2f1c8044776eb68d9a1e2992eb37157b1018a6'/>
<id>urn:sha1:3c2f1c8044776eb68d9a1e2992eb37157b1018a6</id>
<content type='text'>
For HTTP Server using HandleFS, the Range request is handled
automatically.
For other HTTP server, user can use the HandleRange function.

The HandleRange function handle [HTTP Range] request using "bytes" unit.
The body parameter contains the content of resource being requested that
accept Seek method.

If the Request method is not GET, or no Range in header request it will
return all the body [RFC7233 S-3.1].

The contentType is optional, if its empty, it will detected by
http.ResponseWriter during Write.

[HTTP Range]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Range_requests
[RFC7233 S-3.1]: https://datatracker.ietf.org/doc/html/rfc7233#section-3.1

# Conflicts:
#	CHANGELOG.adoc
</content>
</entry>
</feed>
