Commit Graph

28 Commits

Author SHA1 Message Date
Konstantin Käfer
4d5c6333be [core] move retry logic to DefaultFileSource 2015-11-02 17:24:40 +01:00
Konstantin Käfer
32c0fb468f [http] don't retry when there's already a request in progress 2015-10-27 12:11:16 +01:00
Thiago Marcos P. Santos
c65f809651 [core] Move parseCacheControl() up in the class hierarchy
Avoid duplicating it on all the ports.
2015-10-26 18:37:51 +02:00
Konstantin Käfer
5173bf1bb8 [core] Make response data shared to avoid excessive copying 2015-10-26 15:54:27 +01:00
John Firebaugh
686c967c8e [ios] [android] Use Response::NotFound in other HTTP implementations too 2015-09-29 18:20:23 -07:00
Bruno de Oliveira Abinader
0cc69b368d s/HTTPContext/HTTPContextBase/ 2015-07-28 19:27:13 +03:00
Bruno de Oliveira Abinader
e42a903bba Replaced 'override' with 'final' for non-public interfaces 2015-07-28 19:27:13 +03:00
Bruno de Oliveira Abinader
590d9ab95c Created HTTPRequestBase as base for HTTP requests
- Added HTTPRequestBase (inherits from RequestBase)
- retry() is now a pure virtual in HTTPRequestBase
- Moved cancelled bool to HTTPRequestBase
- HTTPContext now handles only HTTPRequestBase*
- Renamed HTTPNSURLRequest, HTTPCURLRequest
2015-07-28 19:27:13 +03:00
Bruno de Oliveira Abinader
785b34df2e Moved ResponseStatus to its own header 2015-07-28 19:27:13 +03:00
Konstantin Käfer
f4707f72e0 Replace mbgl::util::make_unique<> with std::make_unique<> 2015-05-26 17:57:38 +02:00
Minh Nguyễn
d474f35371 Check account type before comparing hostname 2015-05-19 14:33:19 -07:00
Minh Nguyễn
52670f0560 Cache account type user default 2015-05-19 14:31:30 -07:00
Minh Nguyễn
90b70180c5 Compare hostname for adding events=true
ref #1596, #1599
2015-05-19 13:44:29 -07:00
Brad Leege
ec4cd494cb #1596 - Adding mapbox.com checking to http requests 2015-05-19 14:23:21 -05:00
Minh Nguyễn
bb788f56f2 Renamed settings keys
The new keys fit the standard naming convention for Info.plist keys and more clearly communicate how they’re to be used.
2015-05-08 11:51:48 -07:00
Minh Nguyễn
ec241d17ff Fixed NSMutableString leak
Fixed analyzer warnings in http-nsurl target, which is MRR rather than ARC.
2015-05-05 11:33:39 -04:00
John Firebaugh
64251eec75 Introduce and use uv::timer 2015-04-30 12:40:10 -04:00
John Firebaugh
95214472d4 Use uv::async 2015-04-30 12:02:41 -04:00
John Firebaugh
481fa0e69f Restructure *Request and Context
The previous implementation, based on thread-local storage, did not
ensure that the context was destructed before the FileSource run loop.
This resulted in implementations attempting to uv_close handles for a
loop that had already been destroyed.

This change also fixes #1262.
2015-04-28 19:26:35 -04:00
John Firebaugh
8e5fa341eb Remove RequestBase::start
Requests are always started immediately upon construction.

While here, use typed pointers, not void*.
2015-04-28 09:16:26 -04:00
John Firebaugh
cdd8f3ac32 Separate RequestBase from DefaultFileSource internals
SharedRequestBase was trying to do two different jobs: be a base class
for Asset/HttpRequest and track internal state for DefaultFileSource.

Now we have RequestBase for the former, and DefaultFileRequest for the
latter.
2015-04-28 09:16:26 -04:00
John Firebaugh
f4adef1889 pointer ⇢ reference 2015-04-28 09:16:25 -04:00
Konstantin Käfer
452d12e6e6 make implementation files private headers 2015-04-13 18:28:18 +02:00
Konstantin Käfer
16849a341b hide Thread<> and separate the Implementation object 2015-04-13 17:57:45 +02:00
Konstantin Käfer
4c7132337f convert DefaultFileSource to use util::Thread<> 2015-04-10 22:37:27 +02:00
Brad Leege
94bc3c811f #1185 - Adding "events=true" query string to all non metrics http requests if metrics are not disabled 2015-04-02 16:15:25 -05:00
Konstantin Käfer
9781785ab7 scope Requests to an Environment object for easier cancelation
we are now scoping all file requests to an environment object. The FileSource implementation treats
this as an opaque pointer, but allows canceling all Requests that are associated with that pointer.
This is necessary to abort all file requests that originated from a particular Map object. Aborting
a file request is different from canceling a file request: A canceled request doesn't have its
callback called, while an aborted request will have its callback called with an error, indicating
that the environment is going to be shut down.
2015-03-06 08:21:47 -08:00
Konstantin Käfer
29baacf3a5 refactor makefile 2015-02-04 10:49:09 +01:00