Description: Context is the implementation of HTTP Get request to a Rest API facing a 403 triggered by a unexpected HTTP HEAD request Code is the following oUCB = CreateUnoService("com.sun.star.ucb.UniversalContentBroker") oId = oUCB.createContentIdentifier(sURL) oDataSink = CreateUnoListener("XDataSink_", "com.sun.star.io.XActiveDataSink") oCommandEnv = CreateUnoListener("XCommandEnv_", "com.sun.star.ucb.XWebDAVCommandEnvironment") oGetArgs = CreateUnoStruct("com.sun.star.ucb.OpenCommandArgument2") oGetArgs.Mode = 2 oGetArgs.Sink = oDataSink aCommand = CreateUnoStruct("com.sun.star.ucb.Command") aCommand.Name = "open" aCommand.Argument = oGetArgs oContent = oUCB.queryContent(oId) vRet = oContent.execute(aCommand, 0, oCommandEnv) oOutput = oDataSink.getInputStream() function XCommandEnv_getUserRequestHeaders is implemented to provide HTTP header parameters Issue: oUCB.queryContent(oId) is triggering two HTTP requests: HTTP OPTIONS followed by HTTP HEAD request without a way to provide the requested HTTP header parameters and thus endding with a 403 answer from the API oContent.execute(aCommand, 0, oCommandEnv) works fine and triggers a call to XCommandEnv_getUserRequestHeaders allowing to provide HTTP headers parameters Additional information: Implementing error handeling oUCB.queryContent(oId) gets called a second time approx 4s after and then no HTTP requests are triggered Why is queryContent function triggering an HTTP HEAD request if there is no way to provide header parameters ? Steps to Reproduce: 1.execute queryContent 3. Actual Results: HTTP OPTIONS and HTTP HEAD requests are triggered with a way to provide HTTP header parameter Expected Results: No HTTP Head request should be triggered by a call to queryContent without a way to provide HTTP header parameters Reproducible: Always User Profile Reset: No Additional Info: Version: 7.1.6.2 (x64) / LibreOffice Community Build ID: 0e133318fcee89abacd6a7d077e292f1145735c3 CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win Locale: fr-FR (fr_FR); UI: fr-FR Calc: CL
Created attachment 180932 [details] HTTP requests triggered by queryContent
I tried the example code in Writer. Running it in Windows, I get BASIC runtime error. Object variable not set. pointing to vRet = oContent.execute(aCommand, 0, oCommandEnv) On Linux I get BASIC runtime error. Property or method not found: XCommandEnv_getInteractionHandler. and another error dialog BASIC runtime error. An exception occurred Type: com.sun.star.ucb.InteractiveAugmentedIOException Message: at /home/user/libreoffice/ucb/source/ucp/gio/gio_content.cxx:883. Please help. Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 1c638b7ac46d8077994c8483e6becc4a33efd12b CPU threads: 2; OS: Windows 10.0 Build 22621; UI render: Skia/Raster; VCL: win Locale: en-US (en_FI); UI: en-US Calc: threaded Arch Linux 64-bit, X11 Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 713493c107e6a210ef9b87d033efd0614271483a CPU threads: 8; OS: Linux 6.1; UI render: default; VCL: kf5 (cairo+xcb) Locale: fi-FI (fi_FI.UTF-8); UI: en-US Calc: threaded Built on 24 January 2023
Dear yanncailleux, This bug has been in NEEDINFO status with no change for at least 6 months. Please provide the requested information as soon as possible and mark the bug as UNCONFIRMED. Due to regular bug tracker maintenance, if the bug is still in NEEDINFO status with no change in 30 days the QA team will close the bug as INSUFFICIENTDATA due to lack of needed information. For more information about our NEEDINFO policy please read the wiki located here: https://wiki.documentfoundation.org/QA/Bugzilla/Fields/Status/NEEDINFO If you have already provided the requested information, please mark the bug as UNCONFIRMED so that the QA team knows that the bug is ready to be confirmed. Thank you for helping us make LibreOffice even better for everyone! Warm Regards, QA Team MassPing-NeedInfo-Ping
Dear yanncailleux, Please read this message in its entirety before proceeding. Your bug report is being closed as INSUFFICIENTDATA due to inactivity and a lack of information which is needed in order to accurately reproduce and confirm the problem. We encourage you to retest your bug against the latest release. If the issue is still present in the latest stable release, we need the following information (please ignore any that you've already provided): a) Provide details of your system including your operating system and the latest version of LibreOffice that you have confirmed the bug to be present b) Provide easy to reproduce steps – the simpler the better c) Provide any test case(s) which will help us confirm the problem d) Provide screenshots of the problem if you think it might help e) Read all comments and provide any requested information Once all of this is done, please set the bug back to UNCONFIRMED and we will attempt to reproduce the issue. Please do not: a) respond via email b) update the version field in the bug or any of the other details on the top section of our bug tracker Warm Regards, QA Team MassPing-NeedInfo-FollowUp