Skip to content

Commit 0e8727b

Browse files
committed
karm-http: Oops hard coded mime type for file:// urls.
1 parent f88a4d5 commit 0e8727b

File tree

3 files changed

+2
-1
lines changed

3 files changed

+2
-1
lines changed

src/libs/karm-gc/heap.h

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ struct Heap : Meta::Pinned {
3131
_root = next;
3232
}
3333

34+
_root = nullptr;
3435
_last = nullptr;
3536
}
3637

src/libs/karm-http/client.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,6 @@ struct LocalClient : public Client {
171171
auto response = makeRc<Response>();
172172

173173
response->code = Code::OK;
174-
response->header.add("Content-Type", "text/html");
175174

176175
if (request->method == Method::GET)
177176
response->body = co_try$(_load(request->url));

src/web/vaev-driver/loader.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ Async::Task<Gc::Ref<Dom::Document>> _loadDocumentAsync(Gc::Heap& heap, Mime::Url
3030

3131
if (not resp->body)
3232
co_return Error::invalidInput("response body is missing");
33+
3334
auto respBody = resp->body.unwrap();
3435

3536
auto buf = co_trya$(Aio::readAllUtf8Async(*respBody));

0 commit comments

Comments
 (0)