summaryrefslogtreecommitdiff
path: root/Libraries/LibGemini
AgeCommit message (Collapse)Author
2020-10-30LibProtocol+LibGemini+LibHTTP: Provide root certificates to LibTLSAnotherTest
Now we (almost) verify all the sites we browse. Certificate verification failures should not be unexpected, as the existing CA certificates are likely not complete.
2020-10-30LibHTTP+ProtocolServer+LibGemini: Remove Request::schedule()AnotherTest
This API is only used for HttpRequest, but replicated in GeminiRequest without an actual user, so remove it and construct the job like the rest of the protocols.
2020-10-06LibGemini: Improve rendering of <pre> blocksNico Weber
For ```foo asdf jkl; ```bar we would previously generate <pre>foo f ; </pre> ```bar Now we generate <pre> asdf jkl; </pre> * no longer cut off the first 3 characters on most lines. * don't include the closing ``` line in the output. in addition to omitting the '```', this also honors "Any text following the leading "```" of a preformat toggle line which toggles preformatted mode off MUST be ignored by clients." from the spec * ignore the alt text after the toggle-on text. the spec leaves it to the client what to do with that alt text, but it tends to be metadata, and omitting it is simplest for the implementation, so do that. Improves ascii art on many gemini pages, e.g. gemini://carcosa.net/
2020-10-06LibGemini: Fix crash on Link lines without explicit link textNico Weber
Link::Link() does: if (m_name.is_null()) m_name = m_url.to_string(); This tries to set the link text to the link url if there's no explicit link text, but m_url.to_string() returns a temporary string object, and m_name was a StringView, so this ended pointing to invalid memory. This made the converted HTML contain garbage data as link text, which made LibWeb crash. (LibWeb probably shouldn't crash on links with garbage link text, but in this case it helped identify a bug, so let's keep that crash around since real web pages won't trigger it and it's kind of useful to find bugs like this one.) Makes gemini://rawtext.club/ no longer crash Browser.
2020-08-16AK: Rename KB, MB, GB to KiB, MiB, GiBNico Weber
The SI prefixes "k", "M", "G" mean "10^3", "10^6", "10^9". The IEC prefixes "Ki", "Mi", "Gi" mean "2^10", "2^20", "2^30". Let's use the correct name, at least in code. Only changes the name of the constants, no other behavior change.
2020-08-06Refactor: Expose const_cast by removing ByteBuffer::warp(const void*, size_t)asynts
This function did a const_cast internally which made the call side look "safe". This method is removed completely and call sites are replaced with ByteBuffer::wrap(const_cast<void*>(data), size) which makes the behaviour obvious.
2020-08-04LibGemini: Remove unused private field m_queued_finishNico Weber
2020-08-02ProtocolServer+LibTLS: Pipe certificate requests from LibTLS to clientsAnotherTest
This makes gemini.circumlunar.space (and some more gemini pages) work again :^)
2020-06-12AK: Make string-to-number conversion helpers return OptionalAndreas Kling
Get rid of the weird old signature: - int StringType::to_int(bool& ok) const And replace it with sensible new signature: - Optional<int> StringType::to_int() const
2020-05-29Meta: Add a script check the presence of "#pragma once" in header filesEmanuele Torre
.. and make travis run it. I renamed check-license-headers.sh to check-style.sh and expanded it so that it now also checks for the presence of "#pragma once" in .h files. It also checks the presence of a (single) blank line above and below the "#pragma once" line. I also added "#pragma once" to all the files that need it: even the ones we are not check. I also added/removed blank lines in order to make the script not fail. I also ran clang-format on the files I modified.
2020-05-17LibGemini: Implement rendering text/gemini documents to HTMLAnotherTest
This also sets Content-Type to whatever 'meta' contains on success, to allow the browser to pick up what the document contains.
2020-05-17LibGemini+LibHTTP: Defer did_progress call to match other callbacksConrad Pankoff
2020-05-17LibGemini: Implement basic Gemini protocol supportConrad Pankoff