Commit Graph

56270 Commits

Author SHA1 Message Date
Adrien Destugues
a9665fc66a HttpRequest: use data from the input buffer first
The HttpRequest protocol loop is designed using an input buffer storing
data from the socket. At each loop, we try to parse some of the data,
and then read more from the socket.

However, in some cases (in particular with chunks, which we parse only
one at a time in a loop iteration), we may not use all the data from the
buffer. Eventually, we will be left with an "empty" socket (nothing to
read from there) but the request not completed because there is still
data in the input buffer.

In that case, we would hang waiting for a read on the socket, instead of
processing data from the input buffer.

Change the code to read from the socket only if a loop iteration did not
manage to read anything from the input buffer. This means the input
buffer is too small for the next thing to process (it contains less than
one line of data, for example), and in that case we can safely read from
the socket without being blocked.

This should fix several cases where the network code was stuck doing
nothing, including https://my.justenergy.com/ reported in #13010.
2016-10-31 22:00:40 +01:00
Adrien Destugues
af7d48fe5b style fix. 2016-10-31 19:30:49 +01:00
Adrien Destugues
b2fa4e171d HTTP media IO: fix another case of crash. 2016-10-31 19:27:51 +01:00
Adrien Destugues
98e33bf69a HTTPMediaIO: fix crash on exit.
- Remove custom BUrlContext, use the shared one to simplify ownership
  management. This means all HTTP media streams in an application share
  the same context (including cookies), however.
- Fix deletion of the BUrlRequest object, which cannot reliably happen
  before the thread has exited. RequestCompleted is too early.
2016-10-31 18:12:20 +01:00
Humdinger
05574d9b2f Tracker: Fixed alert button label for renaming of home folder
Fixed copy&paste error for button label of renaming action.
2016-10-31 10:09:49 +01:00
Jérôme Duval
7af63063bb media/ffmpeg: skips libswr, and interleaves samples for planar audio.
* workaround for #12720.
2016-10-31 09:47:50 +01:00
Adrien Destugues
905ee3fb8f WebPositive: do not change URL while user is editing it
If you edit the URL while a page is loading, the URL could be changed
from the page load process, losing your edits.

We now check and update the URL only if the URL bar is currently not
focused, so it is possible to edit the URL safely.
2016-10-31 09:22:35 +01:00
Andrew Lindesay
cf65729463 Url: implement same URL parsing logic in C/C++ code
- Remove uses of group matching regular expression, not available on all
  build hosts,
- Parsing is faster than our old regexp engine.

Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>

- Fixes #13002
- Fixed some indentation (tabs vs space), please configure your editor
  properly.
2016-10-31 09:14:44 +01:00
Adrien Destugues
f004acb098 HttpDate: fix parsing of 2-digit year dates.
Fixes #13043.
Added the affected cookies to the testsuite to avoid future regressions.
2016-10-31 08:59:23 +01:00
Adrien Destugues
a5b5f89612 http_streamer: don't access headers before HeadersReceived.
UpdateSize uses HttpResult::Length, which relies on the
contetn-length header to be already received from the server. Doing it
in ConnectionOpened will not work. Doing it from HeadersReceived, which
is called a bit later, will work.

This allows using the http_streamer in webkit for youtube video playing,
and should fix all uses with a fixed size resource (rather than an
endless stream).
2016-10-30 23:53:00 +01:00
Adrien Destugues
cec123b4de More fixes to the cookie parser.
- Fix parsing of strings shorter than 24 bytes (which can only happen if
  the year has only 3 digits, or the day in month, hour, minute or
  seconds have only 1).
- Only allow the GMT and UTC timezone specifiers, as all HTTP dates
  should use the GMT zone (but still use a format that allows specifying
  a timezone name).

All cookie tests are now passing.
2016-10-30 20:23:43 +01:00
Adrien Destugues
b5c858aa75 strptime: allow dates before 1900.
While struct tm makes things more confusing than they need to be,
nothing in the API prevents handling those. So let's just accept them.

Fixes some strange cases in the cookie test suite (with a cookie set to
expire in year 101 B.C.)
2016-10-30 20:23:43 +01:00
Adrien Destugues
2215451b39 BNetworkCookie: fix overflow in date computation.
Fix one of the two failing tests from the cookie testsuite.
2016-10-30 20:23:43 +01:00
Mark Hellegers
a61218b10d Fix #13042: Make sure all cookies are saved 2016-10-30 20:23:43 +01:00
Alexander von Gluck IV
8950e6dc9a radeon_hd: Add missing HD 7570. Clean up some PCI names
* Should resolve #12977. There isn't much info in the
  wild about the HD 7570.
* Clean up naming of some cards per updated AMD pci
  naming table.
2016-10-30 08:39:57 -05:00
Alexander von Gluck IV
06bb9887b4 xhci: Check and report interface version
* We could also check to make sure it isn't 0xffff and
  bail if it is... not really a solution but helps
  prevent kdl's if our mapped memory is corrupted.
* That seems like more of a hack though, i'd like to
  solve the real problem.
2016-10-30 08:39:57 -05:00
Mark Hellegers
65f5e1e1b2 Fix #12799: Enable elf symbol patching for Haiku
Signed-off-by: Jérôme Duval <jerome.duval@gmail.com>
2016-10-30 10:42:24 +01:00
Humdinger
a034dfb647 Small GUI fixes in Notification prefs
* Open the window a bit bigger so the scroll bar in the "Notifications"
  view isn't activated.
* Make the window horizontally resizable.
* Sentence casing
2016-10-30 10:29:26 +01:00
Adrien Destugues
4bc43f4368 style fix. 2016-10-30 09:17:00 +01:00
Alexander von Gluck IV
59e331631f xhci: Trace eecp register before access, not after 2016-10-29 17:49:36 -05:00
Jérôme Duval
58fb6344ae libroot: getlogin_r(): 32 is a valid length.
* also use LOGIN_NAME_MAX for the max length.
2016-10-29 22:39:32 +02:00
Adrien Destugues
afbfc7e505 intel_extreme: set image size on both pipes.
This was hardcoded to pipe A on my laptop, but it's better to set both
pipes so it work in more cases.

Eventually I should see why my SandyBridge laptop is failing to move its
LVDS panel to pipe B...

This fixes miqlas Thinpad X200s and possibly some other machines. Thanks
for letting me experiment with the hardware!
2016-10-29 18:13:10 +02:00
Jérôme Duval
105acc92e3 Terminal: always use bright for bold text.
* "Allow bold font" now enables the use of the bold font for bold text.
* so one can now see bold text in black on black.
2016-10-29 15:14:07 +02:00
Jérôme Duval
6c2abee2f5 Debugger: use localhost if gethostname() fails. 2016-10-29 14:02:40 +02:00
Adrien Destugues
61987fe7a2 runtime_loader: allow the ABI version symbol to be local.
Some libraries buildsystems (eg. zlib) somehow prevent the symbol from
being exported. We should fix that, but binaries with missing symbols
are already out there, so we need to handle them in any case.
2016-10-29 10:16:29 +02:00
autonielx
7393dae631 Update translations from Pootle 2016-10-29 08:06:47 +02:00
Humdinger
2f09702a98 Re-build of libevent, update to transmission package. 2016-10-28 08:56:41 +02:00
Alexander von Gluck IV
273c3bc497 usb: Bump max USB_MAX_PORTS to 255
* Seems more common to have > 16 USB ports on xHCI
  hubs (18 on my XPS 13 root hub)
* This fixes 'hub supports more ports than we do' error
* The FreeBSD USB driver works a lot like ours and
  sets the maximum USB ports on a hub to 255
* Doesn't solve #12885 but fixes one of the errors
2016-10-27 12:43:54 -05:00
John Scipione
134ed61451 ListView: Fix off-by-1 bug introduced in hrev50574
7687a6ef13

jgt^He

Fixes #12990 more better

Thanks Humdinger for noticing this bug and reporting it.
2016-10-26 13:36:49 -07:00
Andrew Lindesay
000b15f2c3 HaikuDepot: Adjust URLs for use with HDS
HDS paths are now prefixed with "__".  This change
makes the corresponding change to the HaikuDepot
desktop application

Fixes #13030.
2016-10-26 23:39:34 +13:00
Adrien Destugues
09c4bc5bd3 runtime_loader: fix getting ABI from gcc .comment
The format for the .comment string changed at some point, and this
fallback code would always fail for files built only with "new" versions
of gcc.

Also consider gcc 5 to be ABI version 4, since it is still compatible
with the old ABI (and provides a new one side by side).

See https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html
for infos on GCC ABI changes in GCC 5.
2016-10-23 22:23:06 +02:00
Ulrich Drepper
d2bd05420a glibc: (_IO_cleanup): Do not use locking when flushing ...
the buffers. Some thread might be using a stream.
2016-10-23 20:30:45 +02:00
Adrien Destugues
16e393a0c5 style fix. 2016-10-23 12:25:40 +02:00
Dario Casalinuovo
e42135e574 http_streamer: improve IsRunning() safeness 2016-10-23 03:30:27 +02:00
Augustin Cavalier
3798bf90cb Use the kDesktopWindowLook/kDesktopWindowFeel constants from WindowPrivate.h...
... instead of redefining them, or including a private Tracker header to
get them.
2016-10-22 04:24:49 -04:00
Augustin Cavalier
49a2d53d35 Magnify: Write an actual image for "save image", not a C++ data header.
I've no idea why this was what "save image" did, but apparently it's
done so since this code was imported into the trunk in the very first
commit. Now it saves PNGs, which is what users expect.

Fixes #5011.
2016-10-22 03:23:21 -04:00
Augustin Cavalier
79d6f0870e PoorMan: Fix 'resizing mode or flags swapped', trim trailing space. 2016-10-22 02:57:04 -04:00
Augustin Cavalier
71452e9833 3rdparty/qtcreator: Totally new version of the create_project_file script.
Qt Creator now has a "generic project" mode, in which it just acts
as an auto-completing code editor. I tried using it on the entire
Haiku project at once, but it's just too much for Qt Creator to handle.
So instead, I created a script which generates project files for
any given directory in the tree, as well as sets up the proper include
directories. The project files themselves are .gitignore'd; use the script
to create them.

Works on Haiku. Did not test on Linux with a crosstools setup; but
it should work there too.
2016-10-22 02:09:56 -04:00
Augustin Cavalier
cfe0adf0fb Tracker: Remove unused definition. 2016-10-22 02:07:27 -04:00
Augustin Cavalier
13cf3fecae Tracker: Remove unused Cursors.h header. 2016-10-22 02:07:27 -04:00
François Revol
b1e2427d75 glibc: replace extern __inline with __extern_always_inline for ppc
As was done for x86 in hrev49774.
2016-10-22 15:53:57 +02:00
François Revol
72ddc912a6 PPC: make arch_framebuffer.h more like ARM version
Now the only difference is the physical address, which is returned as
phys_addr_t as should be.
2016-10-22 15:53:52 +02:00
François Revol
f4dc609dbe U-Boot: PPC: dump the start of the board_data struct
Not so useful but just in case...

Sadly, this struct is both compile-time and arch dependent :-(
2016-10-22 15:53:47 +02:00
François Revol
9e66f03165 U-Boot: PPC: Try to enable unaligned transfers
This however doesn't help with the 64bit float operations that
gcc emits when assigning the physical framebuffer address in kernel_args,
which is a packed struct...
2016-10-22 15:53:38 +02:00
François Revol
e57c83d9e4 U-Boot: PPC: make the shift calculation more obvious
It's the 11th bit, counting from the MSB, on the top 16 bits.
2016-10-22 15:53:24 +02:00
François Revol
1fe7e6711f PPC: call debug_uart_from_fdt with C++ linkage 2016-10-22 15:53:20 +02:00
François Revol
11642b7f2c PPC: arch_asm.S: style fix
Capitalize TODO & FIXME, gedit prefers those
2016-10-22 15:53:15 +02:00
François Revol
33c594f0c7 PPC: U-Boot: fix gUBootOS offset
Since the removal of some other variables we were overwriting some random function.
2016-10-22 15:53:07 +02:00
François Revol
ffb9ffb68d PPC: Use FUNCTION_END in arch_asm.S 2016-10-22 15:52:51 +02:00
François Revol
9d0098ec04 ppc/paging: Convert to new-style CPU management
* Aka, post-scheduler changes
* Luckily PPC paging code is very similar to x86 paging now
2016-10-22 15:52:46 +02:00