Age | Commit message (Collapse) | Author |
|
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.
|
|
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.
|
|
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/
|
|
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.
|
|
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.
|
|
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.
|
|
|
|
This makes gemini.circumlunar.space (and some more gemini pages) work
again :^)
|
|
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
|
|
.. 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.
|
|
This also sets Content-Type to whatever 'meta' contains on success, to
allow the browser to pick up what the document contains.
|
|
|
|
|