[Libreoffice-bugs] [Bug 154628] XML Form Document: Sending data with GET fires very often

2023-05-17 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=154628

Julien Nabet  changed:

   What|Removed |Added

 Status|ASSIGNED|NEW
   Assignee|serval2...@yahoo.fr |libreoffice-b...@lists.free
   ||desktop.org

--- Comment #11 from Julien Nabet  ---
Robert: I must recognize I can't do more here so unassign myself.
I mean if it requires to create a kind of new API in ucbhelper to have
something to just do a GET and still retrieving a ResultStream since 
CSubmissionGet::submit calls:
m_aResultStream = aContent.openStream();
and m_aResultStream is used afterwards.
I won't be able to do it.

I let you decide if you want to put it FIXED or let it open (I can understand
any of these)

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 154628] XML Form Document: Sending data with GET fires very often

2023-05-16 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=154628

Julien Nabet  changed:

   What|Removed |Added

   Assignee|libreoffice-b...@lists.free |serval2...@yahoo.fr
   |desktop.org |
 Status|NEW |ASSIGNED

--- Comment #6 from Julien Nabet  ---
I've submitted this patch on gerrit:
https://gerrit.libreoffice.org/c/core/+/151852

it may be more practical to discuss about it.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 154628] XML Form Document: Sending data with GET fires very often

2023-05-16 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=154628

Julien Nabet  changed:

   What|Removed |Added

 CC||michael.st...@allotropia.de

--- Comment #5 from Julien Nabet  ---
Here are 2 bts retrieved from 1 click:
#0  http_dav_ucp::Content::open(com::sun::star::ucb::OpenCommandArgument3
const&,
com::sun::star::uno::Reference
const&)
(this=0x561e53e48450, rArg=..., xEnv=uno::Reference to
(CCommandEnvironmentHelper *) 0x561e548cce88) at
ucb/source/ucp/webdav-curl/webdavcontent.cxx:2201
#1  0x7f6d984d4ad2 in
http_dav_ucp::Content::execute(com::sun::star::ucb::Command const&, int,
com::sun::star::uno::Reference
const&)
(this=0x561e53e48450, aCommand=..., Environment=uno::Reference to
(CCommandEnvironmentHelper *) 0x561e548cce88) at
ucb/source/ucp/webdav-curl/webdavcontent.cxx:539
#2  0x7f6d984e726d in non-virtual thunk to
http_dav_ucp::Content::execute(com::sun::star::ucb::Command const&, int,
com::sun::star::uno::Reference
const&) ()
at /home/julien/lo/libreoffice/instdir/program/../program/libucpdav1.so
#3  0x7f6dd9d51947 in
ucbhelper::Content_Impl::executeCommand(com::sun::star::ucb::Command const&)
(this=0x561e53be4150, rCommand=...) at ucbhelper/source/client/content.cxx:1264
#4  0x7f6dd9d5480b in
ucbhelper::Content::openStream(com::sun::star::uno::Reference
const&)
(this=0x7ffe1b880810, rStream=uno::Reference to (io_stm::(anonymous
namespace)::OPipeImpl *) 0x561e546391c8) at
ucbhelper/source/client/content.cxx:825
#5  0x7f6d9b6674e1 in
CSubmissionGet::submit(com::sun::star::uno::Reference
const&)
(this=0x561e4fc22880, aInteractionHandler=uno::Reference to
(svxform::FormController *) 0x561e53d71388) at
forms/source/xforms/submission/submission_get.cxx:84

+

#0  http_dav_ucp::Content::open(com::sun::star::ucb::OpenCommandArgument3
const&,
com::sun::star::uno::Reference
const&)
(this=0x561e53e48450, rArg=..., xEnv=uno::Reference to
(CCommandEnvironmentHelper *) 0x561e548cce88) at
ucb/source/ucp/webdav-curl/webdavcontent.cxx:2267
#1  0x7f6d984d4ad2 in
http_dav_ucp::Content::execute(com::sun::star::ucb::Command const&, int,
com::sun::star::uno::Reference
const&)
(this=0x561e53e48450, aCommand=..., Environment=uno::Reference to
(CCommandEnvironmentHelper *) 0x561e548cce88) at
ucb/source/ucp/webdav-curl/webdavcontent.cxx:539
#2  0x7f6d984e726d in non-virtual thunk to
http_dav_ucp::Content::execute(com::sun::star::ucb::Command const&, int,
com::sun::star::uno::Reference
const&) ()
at /home/julien/lo/libreoffice/instdir/program/../program/libucpdav1.so
#3  0x7f6dd9d51947 in
ucbhelper::Content_Impl::executeCommand(com::sun::star::ucb::Command const&)
(this=0x561e53be4150, rCommand=...) at ucbhelper/source/client/content.cxx:1264
#4  0x7f6dd9d53860 in ucbhelper::Content::openStream()
(this=0x7ffe1b880810) at ucbhelper/source/client/content.cxx:709
#5  0x7f6d9b667593 in
CSubmissionGet::submit(com::sun::star::uno::Reference
const&)
(this=0x561e4fc22880, aInteractionHandler=uno::Reference to
(svxform::FormController *) 0x561e53d71388) at
forms/source/xforms/submission/submission_get.cxx:88

These 2 calls at frame 0 call a GET function.

The 2 different calls are from
forms/source/xforms/submission/submission_get.cxx
line 84 and 88
 83 css::uno::Reference< XOutputStream > aPipe(
css::io::Pipe::create(m_xContext), UNO_QUERY_THROW );
 84 if (!aContent.openStream(aPipe))
 85 return UNKNOWN_ERROR;
 86 // get reply
 87 try {
 88 m_aResultStream = aContent.openStream();
 89 } catch (const Exception&) {
 90 OSL_FAIL("Cannot open reply stream from content");
 91 }

So perhaps we may just avoid the first call and use this patch:

diff --git a/forms/source/xforms/submission/submission_get.cxx
b/forms/source/xforms/submission/submission_get.cxx
index ae630b504b0c..1ddcd529ef1a 100644
--- a/forms/source/xforms/submission/submission_get.cxx
+++ b/forms/source/xforms/submission/submission_get.cxx
@@ -24,7 +24,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 

@@ -80,9 +79,6 @@ CSubmission::SubmissionResult CSubmissionGet::submit(const
css::uno::Reference<
 }
 OUString aQueryURL = OStringToOUString(aUTF8QueryURL,
RTL_TEXTENCODING_UTF8);
 ucbhelper::Content aContent(aQueryURL, aEnvironment, m_xContext);
-css::uno::Reference< XOutputStream > aPipe(
css::io::Pipe::create(m_xContext), UNO_QUERY_THROW );
-if (!aContent.openStream(aPipe))
-return UNKNOWN_ERROR;
 // get reply
 try {
 m_aResultStream = aContent.openStream();

Michael: does it seem reasonable?

Robert: if the patch is ok, it would allow you to just use:
"IF ($_SERVER['REQUEST_METHOD'] == "GET")" in xmldata_get.php
Without this 

[Libreoffice-bugs] [Bug 154628] XML Form Document: Sending data with GET fires very often

2023-05-15 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=154628

QA Administrators  changed:

   What|Removed |Added

 Whiteboard| QA:needsComment|

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 154628] XML Form Document: Sending data with GET fires very often

2023-05-15 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=154628

Robert Großkopf  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever confirmed|0   |1

--- Comment #4 from Robert Großkopf  ---
(In reply to Julien Nabet from comment #3)
> 
> Anyway, what would be the goal to reach here:
> - send HEAD once, send GET once and add one record in xml file?
> - just send GET once and add one record in xml file?
> - other?

Don't know much about the commands, but with other connections I used
(PHP-Apache-MySQL/MariaDB) it should only sen GET-command one time. At this
moment I get 3 or 4 new entries. I have seen HEAD will only be send one time so
I changed the *.php-file to get only the content together with HEAD. But I
don't know if this is the right behavior.

Might be this helps:
https://www.rfc-editor.org/rfc/rfc2616#section-9.3
Seems it would help only to use HEAP.

I will set this one to NEW (comment 3)

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 154628] XML Form Document: Sending data with GET fires very often

2023-05-15 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=154628

--- Comment #3 from Julien Nabet  ---
Thank you Robert for the zip file.

I gave a try and when clicking on Daten > Server > Get, I got 3 times this line
Robvan Eden^M

and this in logs:
127.0.0.1 - - [15/May/2023:21:34:07 +0200] "HEAD
/robert/xmldata_get.php?Vorname=Rob=van+Eden& HTTP/1.1" 200 128 "-"
"LibreOffice 7.6.0.0 denylistedbackend/8.0.1 NSS/3.87.1"
127.0.0.1 - - [15/May/2023:21:34:07 +0200] "GET
/robert/xmldata_get.php?Vorname=Rob=van+Eden& HTTP/1.1" 200 178 "-"
"LibreOffice 7.6.0.0 denylistedbackend/8.0.1 NSS/3.87.1"
127.0.0.1 - - [15/May/2023:21:34:07 +0200] "GET
/robert/xmldata_get.php?Vorname=Rob=van+Eden& HTTP/1.1" 200 178 "-"
"LibreOffice 7.6.0.0 denylistedbackend/8.0.1 NSS/3.87.1"

(I created a local link for Apache2 with "robert", more straigthforward than
opening the odt file to change the path :-)).


Just once, I got 4 times with:

127.0.0.1 - - [15/May/2023:21:32:18 +0200] "OPTIONS
/robert/xmldata_get.php?Vorname=Rob=van+Eden& HTTP/1.1" 200 178 "-"
"LibreOffice 7.6.0.0 denylistedbackend/8.0.1 NSS/3.87.1"
127.0.0.1 - - [15/May/2023:21:32:18 +0200] "HEAD
/robert/xmldata_get.php?Vorname=Rob=van+Eden& HTTP/1.1" 200 128 "-"
"LibreOffice 7.6.0.0 denylistedbackend/8.0.1 NSS/3.87.1"
127.0.0.1 - - [15/May/2023:21:32:18 +0200] "GET
/robert/xmldata_get.php?Vorname=Rob=van+Eden& HTTP/1.1" 200 178 "-"
"LibreOffice 7.6.0.0 denylistedbackend/8.0.1 NSS/3.87.1"
127.0.0.1 - - [15/May/2023:21:32:18 +0200] "GET
/robert/xmldata_get.php?Vorname=Rob=van+Eden& HTTP/1.1" 200 178 "-"
"LibreOffice 7.6.0.0 denylistedbackend/8.0.1 NSS/3.87.1"
but don't know how to reproduce this last one.

Anyway, what would be the goal to reach here:
- send HEAD once, send GET once and add one record in xml file?
- just send GET once and add one record in xml file?
- other?

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 154628] XML Form Document: Sending data with GET fires very often

2023-05-15 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=154628

Robert Großkopf  changed:

   What|Removed |Added

   Assignee|rob...@familiegrosskopf.de  |libreoffice-b...@lists.free
   ||desktop.org

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 154628] XML Form Document: Sending data with GET fires very often

2023-05-15 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=154628

Robert Großkopf  changed:

   What|Removed |Added

   Assignee|libreoffice-b...@lists.free |rob...@familiegrosskopf.de
   |desktop.org |

--- Comment #2 from Robert Großkopf  ---
Created attachment 187304
  --> https://bugs.documentfoundation.org/attachment.cgi?id=187304=edit
Zip package contains a form, a *.php-file and two files for data

The form has different Button for sending data. Only button for 
Daten > Server > Get
is needed.
Submission → Server_Get → Action must be modified to your (local) web server.

The php file must be positioned in path for the (local) web server. 
Create a sub folder to this file called /data. Data should be writable for all
(or wwwrun).
The two files "Daten_einfach_formatiert.xml" and "Daten_einfach_formatiert.xsl"
should be copied in this folder. *.xml-file should be writable to all.

After sending data to the *.php-file you could have a look at apache2 log file:
There is more than one Server request. There is a way to get only one of this
request by setting 
IF ($_SERVER['REQUEST_METHOD'] == "HEAD")
because this method only appears once. But why do all the other requests
appear?
Have a look at the file *.xml file. Every time you send new data there will be
about 4 new entries.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 154628] XML Form Document: Sending data with GET fires very often

2023-05-15 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=154628

Julien Nabet  changed:

   What|Removed |Added

 CC||serval2...@yahoo.fr

--- Comment #1 from Julien Nabet  ---
Would it be possible you attach a minimum php file so we can try to reproduce
this? (of course, it'll still require an Apache or other web server)

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 154628] XML Form Document: Sending data with GET fires very often

2023-04-19 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=154628

QA Administrators  changed:

   What|Removed |Added

 Whiteboard|| QA:needsComment

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 154628] XML Form Document: Sending data with GET fires very often

2023-04-05 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=154628

Robert Großkopf  changed:

   What|Removed |Added

 Blocks||154386


Referenced Bugs:

https://bugs.documentfoundation.org/show_bug.cgi?id=154386
[Bug 154386] [META] XML Form
-- 
You are receiving this mail because:
You are the assignee for the bug.