summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorNguyễn Gia Phong <mcsinyx@disroot.org>2022-11-09 18:05:59 +0900
committerNguyễn Gia Phong <mcsinyx@disroot.org>2022-11-09 18:05:59 +0900
commit5187250ba942d3c5100982d071332f5b4b561119 (patch)
treed74fe084074bc0c3c64dbe628512a2cd6839f1ca /src
parent0f62bd4871c66903744baea93f650923a0b40af0 (diff)
downloadfead-5187250ba942d3c5100982d071332f5b4b561119.tar.gz
Support URL query 0.1.2
Diffstat (limited to 'src')
-rwxr-xr-xsrc/fead.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/fead.py b/src/fead.py
index 600dff0..ffe7b6f 100755
--- a/src/fead.py
+++ b/src/fead.py
@@ -151,7 +151,8 @@ async def fetch(raw_url):
         reader, writer = await open_connection(url.hostname, 80)
     else:
         raise ValueError(f'unsupported URL scheme: {url.scheme}')
-    writer.write(REQUEST.format(url.path or '/', url.hostname).encode())
+    writer.write(REQUEST.format(f"{url.path or '/'}?{url.query}",
+                                url.hostname).encode())
     response = HTTPResponse(BytesSocket(await reader.read()))
     writer.close()