The existing HTTP header date format handling code is employed
rather than using specific logic for HD. Also the "Location"
header handling is changed to work better for non-absolute
URLs arriving in this header value on a redirect. Both
suggestions from Adrien.
The asynchronous listener had no reliable way to access HTTP result and
headers from the callbacks. As the callbacks are triggered
asynchronously, they can be run after the request has carried on and,
for example, followed an HTTP redirect, clearing its internal state.
The HeadersReceived callback now passes a reference to BUrlResult for
the request. There are two cases:
- Synchronous listener: passes a reference to the request's results
directly
- Asynchronous listener: archives a copy of the result into the
notification message, and passes a reference to the unarchived copy.
Unfortunately this comes with several ABI and API breakages:
- Change to the prototype of HeadersReceived()
- Change to the class hierarchy of BUrlResult (implements BArchivable)
All users of HTTP requests will need to be updated if they implemented
in HeadersReceived or used BUrlResult.
The main lock on the cookie jar must always be locked before the rwlocks
for each domain list. This was reversed in one place, leading to a
typical deadlock pattern. Fixes one case of freeze in WebPositive: two
request threads whould interlock, and then anything trying to access the
cookie jar (including the main thread of Web+ to handle javascript
access to cookies) would also lock.
ThreadsTableModel:
- When returning field values for the stop reason column, only return valid if
we actually populated it with a value (ergo, the thread was actually
stopped). Otherwise, the table will attempt to perform comparisons on a
BVariant which was never actually populated, leading to crashes.
Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
This patch was never applied after GSoC 2012. Rebase the parts that
still apply so we can close the ticket.
Fixes#9490.
* I was pretty sure that I didn't change the logic, but turns out
I was wrong. Sorry about that.
* Adjusted copy-pasted comments.
Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Fixes#13238.
Since the "Layout" group is a member of the "Interface" group,
Doxygen automatically adds the "Interface" group to all pages
in the "Layout" group, meaning that having an explicit "ingroup Interface"
created duplicate group tags.
Previously each icon would launch an independent HTTP request to
pull down the HVIF icon data. This change means that the data
will be pulled down in bulk across all packages as a .tgz and
will then be kept in a cache locally. The client-server logic
will use standard "If-Modified-Since" headers to check for
updates each time the HaikuDepot desktop application starts up.
This arrangement will bring down the HVIF as well as bitmap
icons and use the best representation it can.
Additionally, it is possible from a command-line option to log
HTTP traffic verbosely and it is also possible to use an "-h"
flag to display help on command-line arguments.
The code-structure around this change also anticipates some
future extensions to handle other client-server improvements.
Fixes#11804
Surprisingly, after disabling the new Markdown support in the Doxyfile,
everything else pretty much worked out of the box. Only a number of CSS
changes were needed to adapt.
I wonder why nobody ever did this back in 2012 when 1.8 first came out...
* A TimeSource need an additional hook called FinishCreate to be
able to create it's transfer area. This hook was called after the
node registration making room for potential mismatch of the transfer
buffer. Most media nodes such as an event looper call
begin to work with time related functions just once the registration
happens. It could cause shadowed timesource objects initialization
to fail too.
* Add a debugger call to prevent any node to use an unitialized
TimeSource area, that would help to identify any remaining issue.
Previously it would warn only below 20MB of free space, if this was
less than 10% of the drive's capacity. This is obviously ridiculous now.
The first suggested patch used a simple 10% as the new criteria, but that's
a little high -- 100GB out of a 1TB drive is still a bunch of space left.
5% seems like a more appropriate choice here, and preserves a behavior
closer to the original 20MB on smaller (older) drives (5% of 500MB = 25MB.)
If this turns out to be too annoying for some users, we can make the check
more refined than it is now, but I don't think that will be necessary.
Fixes#4520.
When renaming an entry at the edge of a PoseView, the input
would not resize as usual. This change ensures the input
becomes resizable again if the text becomes small enough.
Fixes#3438.
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
Show error messages when saving fails, to enmake sure the user is not
confused by thinking the file saved when the window doesn't close.
Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Fixes#12945
* The semaphore wasn't really needed to do what it did; using
atomic_{get|set}() as suggested by jua is much faster, anyway.
* Thanks to Dario for the initial work on this.