summaryrefslogtreecommitdiffstats
path: root/src/core/api/qwebengineurlrequestjob.cpp
Commit message (Collapse)AuthorAgeFilesLines
* CRA mark src/core/apiMoss Heim2025-08-121-0/+1
| | | | | | | | QUIP: 23 Fixes: QTBUG-138720 Pick-to: 6.10 6.9 6.8 Change-Id: I9c064bef911e36c12553fc6cebb7408fb02bcc0b Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Doc: Various punctuation fixesKaloyan Chehlarski2025-02-101-3/+3
| | | | | Change-Id: I65b22658eb46e2460e0bd8d82f528671b33fad66 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix deprecation of QWebEngineUrlRequestJob::NoError after API reviewSzabolcs David2024-06-241-1/+1
| | | | | | Pick-to: 6.8 Change-Id: I6919c441053f4378d1785bfa97067ef58c0240e1 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Allow succeeding URLRequestJobs without actual content loadingSzabolcs David2024-05-301-1/+1
| | | | | | | | | | | | | | | There is no way to signal LoadSucceeded without doing content load. Calling QWebEngineUrlRequestJob::reply() with an invalid QIODevice could be an alternative for this. Calling QWebEngineUrlRequestJob::fail() with NoError does nothing, but it was documented as "The request was successful." Deprecate this. [ChangeLog][WebEngineCore] QWebEngineUrlRequestJob::NoError is deprecated Task-number: QTBUG-114360 Change-Id: I09d38bdd622413362ae14f8aa6ac7c447946fafb Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Switch additional response header to QMultiMapAllan Sandfeld Jensen2023-08-251-1/+1
| | | | | | | | | For consistency with other response headers, even if it is going to be inconsistent with existing request headers. Pick-to: 6.6 Change-Id: I9e9c36ac20982d9c833486171fa9944c9059f471 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Add ResourceRequestBody to QWebEngineUrlRequestJobYigit Akcay2023-06-201-0/+14
| | | | | | | | | Add ResourceRequestBody to QWebEngineUrlRequestJob, thus exposing the request body to custom URL scheme handlers. Fixes: QTBUG-67055 Change-Id: I0a31dfdbb4e3353dc1e469234ba452a0cbfd5965 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* QWebEngineUrlRequestJob: Add function to set additional reponse headersYigit Akcay2023-01-261-0/+12
| | | | | | | | | | | | | | | Add additional response headers field to URLRequestCustomJobDelegate. Those fields can be set via QWebEngineUrlRequestJob::setAdditionalResponseHeaders( const QMap<QByteArray, QByteArray> & ). They are added to URLRequestCustomJobProxy::m_client when URLRequestCustomJobProxy::reply(std::string, QIODevice) is called, and added to the response headers within CustomURLLoaderFactory::notifyHeadersComplete(). Fixes: QTBUG-106578 Change-Id: Ie0f0af07a5381c6f24ec0a1ee1b5bcb0e8c4fa5f Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Use SPDX license identifiersLucie Gérard2022-06-221-38/+2
| | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. License files are organized under LICENSES directory. Pick-to: 6.4 Task-number: QTBUG-67283 Change-Id: I869ffda1080e283f231eb0dc4477b260f2054d99 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Include moc filesAllan Sandfeld Jensen2022-05-311-0/+2
| | | | | | | | Faster to build and gives smaller binaries Fixes: QTBUG-103291 Change-Id: Iab52995e03c13a4c5b185750028c449a19d98d93 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Add charset parsing to custom scheme handler's content typeAllan Sandfeld Jensen2022-02-161-1/+4
| | | | | | | | | | This was already assumed by test in tst_qwebengineprofile. [ChangeLog][QWebEngineUrlRequestJob] Charset is now explicitly parsed from provided contentType Pick-to: 6.3 Change-Id: I9bfb1f94cf523fbe0f9796654b4114e61e904c92 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Cleanup coding style in src/core/apiAllan Sandfeld Jensen2019-05-031-3/+2
| | | | | Change-Id: I1c235d49a9520088142fbc89d21fc589d4037a4f Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* API cleanupAllan Sandfeld Jensen2019-02-271-1/+1
| | | | | | | Based on review feedback Change-Id: Ide40d4fd563ea682eaa2cc457d857445adea85cd Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* Add HTTP request headers to custom URL schemes (reland)Allan Sandfeld Jensen2019-01-301-0/+9
| | | | | | | | | | Makes it possible to read extra headers added to the request. This reverts commit 9cbe64c54dee8451794e29f4357ccfac6d883e6b. Task-number: QTBUG-69844 Change-Id: I5c5e0c06655d5f764227fdc97fdb0c2a189f532d Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Fix bougs documentation for QWebEngineUrlRequestJob::replyMichal Klocek2018-07-301-2/+3
| | | | | | | | | | | IODevice::close and therefore aboutToClose is called by io thread, connecting it to deleteLater will register deferred delete on event loop of IODevice instance, which is on ui thread. This could be racy since deletion on ui thread can happen before job is done. Change-Id: I895e6a71649ba65944d069f254d119cc60aada6c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* QWebEngineUrlRequestJob: QUrl("null") for unique initiator originsJüri Valdmann2018-07-201-3/+18
| | | | | | | | | | | | The empty URL is used both for representing a missing origin (browser-initiated navigation request) and a unique/opaque origin. This is problematic since the security implications are very different in these two cases: browser-initiated requests usually should have high security clearance, while requests from unique origins should be restricted. Task-number: QTBUG-69372 Change-Id: Iff73fd1c9a29f1c5c281a8945536333081ff2d6b Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Cleanup file locationsAllan Sandfeld Jensen2018-03-201-2/+2
| | | | | | | | Move printing and network specific classes to subdirectories so we have fewer files in the main dir. Change-Id: I675b1b8b8fd1588061104cec181087f305b44f98 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Add initiator to QWebEngineUrlRequestJobAllan Sandfeld Jensen2018-01-221-0/+11
| | | | | | | Add a property that can be used to tell what is making the URL request. Change-Id: Ic7224382165e93d3c043c30e9a7cc5be9f29d9db Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Merge remote-tracking branch 'origin/5.9' into 5.10Allan Sandfeld Jensen2018-01-081-0/+8
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/core/api/qwebengineurlrequestjob.cpp src/core/browser_context_adapter.cpp src/core/renderer/user_resource_controller.cpp src/core/web_engine_context.cpp src/webenginewidgets/api/qwebenginepage.cpp Change-Id: I5278e5e22e1776d42975fc94d70ff8ca4f81fb9a
| * Doc: QWebEngineUrlRequestJob: mention when to delete the deviceDavid Faure2017-12-201-0/+7
| | | | | | | | | | | | | | | | | | | | It's used from another thread, so it shouldn't be deleted immediately, and it's not deleted by the QtWebEngine code, so tell people to do it themselves at the right time. Change-Id: I54786be320f5fe82f144e7b1c2e6137260d9ceab Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Simplify URLRequestCustomJob handlingMichal Klocek2017-09-111-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Improve implementation of URLRequestCustomJob: * remove qmutex, pass values using PostTask * do not use base::WeakPtr which is not thread safe and must always be dereferenced on the same thread * add proxy object to handle interactions between threads * do not use QPointer to track IODevice since it does not solve anything for us * QIODevice in reply method is used only by IO thread * do not make shared object to commit suicide, instead use refcounted object * improve documentation about thread safety issue of QIODevice object in reply method Change-Id: Ic29bf262de8082dfd46cb9217a68f3c982d16b9e Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Refactor URLRequestCustomJobMichal Klocek2017-09-111-0/+1
|/ | | | | | | | | Move URLRequestCustomJobShared to separate file and rename class to URLRequestCustomJobProxy. This commit is a groundwork for following one. Change-Id: I122b2101789e91186a3bffa9a07eed43b7340418 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Unify license header usage.Jani Heikkinen2016-02-011-11/+14
| | | | | | | | | Update files using old header.LGPL3 to use header.LGPL Update files using old header.FLD to use new header.FDL Update files using old header.BSD to use new header.BSD Change-Id: I36a67aaa8c3ca6c7946308defc9c03c3571a7d23 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* Doc: edit QWebEngineUrlRequestJob docsLeena Miettinen2015-10-061-9/+29
| | | | | | | | | - Add docs for the Error enum - Fix incorrect argument name - Edit for grammar Change-Id: I6c4364eb0a4dd52e38eaf1cde46aec4ddff99532 Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
* Make request job and request info methods consistentAllan Sandfeld Jensen2015-09-061-7/+15
| | | | | | | | | | Changes the method names so the two request representation uses the same method name and the same style of naming of actions on the requests. Change-Id: I409ed1a5f6ac0835878f65ee978b6f224e42aa20 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Move custom URL scheme handlers to coreAllan Sandfeld Jensen2015-08-271-0/+110
Makes the custom URL scheme handler API public, and moves it to core so that it may be shared with the QQuickWebEngine API. Change-Id: I745cb088df6f4cd11b1ac7c8c3c76f112032cb38 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>