Date | Commit message (Collapse) |
|
Even with output buffering disabled via IO::Handle::autoflush,
writes are not atomic unless it is a single argument passed to
"print". Multiple arguments to "print" will show up as multiple
calls to write(2) instead of a single, atomic writev(2).
|
|
git-http-backend may take a while, ensure we can process other
requests while waiting on it. We currently do this via
Danga::Socket in public-inbox-httpd; but avoid exposing this
internal implementation detail to the PSGI interface and
instead only expose a callback via: $env->{'pi-httpd.async'}
|
|
Designing for asynchronous, non-blocking operations makes
adapting for synchronous, blocking operation easy.
Going the other way around is not easy, so do it now and
allow us to be more easily adapted for non-blocking use
in the next commit...
|
|
This allows us to stream the output to the client without buffering
everything up-front. Next, we'll let Danga::Socket (or AE in the
future) wait for readability.
|
|
This allows users to avoid HTTPS -> HTTP downgrade warnings,
but we will also avoid encouraging them towards HTTPS, for now.
IMHO: the CA system gives a false sense of security,
TLS libraries (e.g. OpenSSL) can introduce new bugs and
problems (even to attack clients), and TLS libraries
also eats memory on cheap servers.
|
|
This allows multiple instances the WWW app from
running within the same process space
|
|
Relying on Plack::Handler::CGI is much easier for long-term
maintenance and development.
Nowadays, we even include our own httpd implementation to
facilitate easier deployment with PSGI/Plack.
|
|
Setting the "In-Reply-To:" header via mailto: links is not
well-supported and should probably not be encouraged unless
the client situation improves.
So instead, teach users more widely-supported ways of setting
the In-Reply-To: header to ensure proper threading of replies.
|
|
For future changes, this will allow us to more quickly notice
if we keep the heavy Email::MIME object around too long.
It has the side effect of avoiding extra method calls with
Email::MIME which forwards header calls to the header_obj.
|
|
This is meant to provide an easy starting point for server admins.
It provides a basic HTTP server for admins unfamiliar with
configuring PSGI applications as well as being an identical
interface for management as our nntpd implementation.
This HTTP server may also be a generic Plack/PSGI server for
existing Plack/PSGI applications.
|
|
Avoid unintentionally switching protocols if the external site
we're linking to supports both HTTP and HTTPS.
We do not want to force HTTPS everywhere because potential
bugs and performance problems in the TLS stack may outweigh
the privacy benefits. Leave up to site authors and users
to decide whether they want HTTPS or plain old HTTP.
|
|
Not everybody is willing to install or run ssoma; but at least
document "git clone --mirror" usage to promote data distribution.
It's wasteful to clone without "--mirror", so we'll suggest that
to avoid wasting disk space and inodes.
|
|
All public-inbox instances shall be clone-able.
|
|
Normal browsers should understand relative path names.
Atom feeds may be hosted externally and seems to need
full URLs.
|
|
In an single-message thread with a ghost parent, we need to
go up level from the current Message-ID before appending the
parent message to us.
|
|
Dropping "[FOO]" prefixes for the purposes of summarization
is tricky and we end up with odd display behavior.
Just show Subject line changes as the writer intended
(with the exception of normalization to strip the "Re: ")
|
|
It seems we need to declare "alternate" and "text/html" at least
for feed readers.
|
|
This requires POST and (small file) upload support from the
PSGI/Plack web server. CGI.pm is currently not supported with
this feature.
We'll serve everything git can handle by default for performance
in the general case.
To avoid introducing cognitive overhead for sysadmins managing
existing HTTP backends, we do not introduce new configuration
directives.
Thus, setting http.uploadpack=false in the relevant git config
file for each public-inbox (ssoma) git repo will disable smart
HTTP for CPU/memory-constrained systems.
Technically we could support http.receivepack to allow posting
messages to a public-inbox over HTTP(S), but that breaks
the public-inbox model of encouraging users to Cc: everyone.
Again, we encourage users to Cc: everyone to reduce the chance
of a public-inbox becoming a centralized point of
failure/censorship.
|
|
This is enabled by default, for now.
Smart HTTP cloning support will be added later, but it will
be optional since it can be highly CPU and memory intensive.
|
|
We should not hide the parent Message-ID in this view;
give the user the option to find the message in other archives.
|
|
The word "skip" can be confusing. Instead, spell out "scroll down"
for the user to read and only display that text when the thread
is sufficiently long.
|
|
There's no need to HTML escape a timestamp we generate ourselves.
We need to preserve the leading space and can't use the "oneline"
semantics to preserve alignment.
|
|
Inevitably, somebody will care about semantic HTML; but
preserving the original intent of the email author is
important.
|
|
Sometimes users forget trailing slashes; but we should not punish
them with infinite loops.
|
|
Oops :x
|
|
We should be able to use this for ASCII art and paragraphs
|
|
Not needed, but this is good documentation. Some of these values
should never have newlines.
|
|
We can avoid making getpeername syscalls this way.
|
|
The threaded search view is somewhat alien to new users,
so ensure we label the word "relevance" for them.
|
|
We'll probably want to continue supporting CGI for mod_perl
compatibility.
|
|
We use query strings for search and index pages, so
we should not drop them if somebody types a URL by hand
and omits the trailing slash.
|
|
Oops, the rarely-accessed threaded search view was completely
broken. Additionally, the normal threading depths were broken
when we attempted to go up-thread and replies got nested
improperly
Followup to commit be984ce279776d4513b4ca1bff05ebecafdd1bad
("view: thread using <ul> instead of <table>")
|
|
Linking to the expanded thread page probably makes more sense
as it avoid unnecessary scanning for the thread summary.
|
|
We already use "` " (backtick + space) to denote one indentation
level, so do not excessively indent and always pad with one
level less of spaces.
The 'x' operator in Perl handles negative values, so subtracting
one from level=0 will result in an empty string without spaces.
|
|
On second viewing, this does render small cues which makes the
output more pleasant for lynx users. We avoid injecting the
root (level=0) message into a list since it still wastes
precious horizontal whitespace on small displays.
This also results in small reductions in bandwidth usage as
it takes fewer tags/whitespace to render unordered lists.
|
|
While having the extra " feed" is noisy in the main topic
landing page, it is useful in headers/footers which have
plenty of space to be more descriptive.
|
|
Oops, we've had this forever and we also lacked a space
between the this was noticed while adding an extra
line between the "Search results ordered by" header
and actual messages.
|
|
Hopefully, "mbox.gz" is sufficiently understandabe that
we can get rid of the "title" attribute in <a> tags
(we already omitted the title in other pages).
Additionally, drop the '@' in front of the date.
The date should be obvious and is not necessary for
headers without author attribution.
|
|
Oops :x We need better testing...
Fixes: commit 4c2c2325d2948ec5340e2fcafbee798cf568f5fd
("rename 'GitCatFile' package to 'Git'")
|
|
Fixes: commit 398e29344ecc43548a7d3998bb5d2fcee62d66cd
("view: favor whitespace wrap in <head>")
Oops.
|
|
If we bite the bullet and rely on inline CSS, we might as well
only specify it once per page instead of inline in every <pre>
tag which may handle UGC. So this actually saves us a small
amount of bandwith on most pages which have multiple <pre>
start tags.
|
|
Ghost message links didn't show up too well after
commit bc067a7562a586bed92401fe1084bbe423b9451a
("view: move thread info near top of single view")
Additionally, attribution lacked a space when subjects changed
mid-thread.
|
|
Fixes commit 4c2c2325d2948ec5340e2fcafbee798cf568f5fd
("rename 'GitCatFile' package to 'Git'")
|
|
Most framed mail viewing software has message ancestry
information near the top instead of bottom (mutt, gmane,
sylpheed, thunderbird) as it can help improve context.
Traditional netiquette also favors writing replies below
quoted (older) text for this reason; so move the thread
summary to the top of the message for context.
Since threads may be long, add a "skip" anchor link to jump to
the message body quickly, and align the date to the left column
so it's easier to tell the relative age of messages.
While we're at it, remove quotes from "id" attributes to
improve ease-of-grep-ability.
|
|
Users may be iterating through lists and come up with nothing
|
|
We'll be using it for more than just cat-file.
Adding a `popen' API for internal use allows us to save a bunch
of code in other places.
|
|
The "cat_file" sub now allows a block to be passed for partial
processing. Additionally, a new "check" method is added to
retrieve only object metadata: (SHA-1 identifier, type, size)
|
|
User-generated content (UGC) may have excessively long lines
which screw up rendering. This is the only bit of CSS we use.
|
|
These will be reused elsewhere.
|
|
Sometimes users (me :x) blindly append "raw" to a /t/ URL...
|