Skip to main content

Post Data

1 reply [Last post]
Jacob_strauss
Offline
Joined: 2006-02-17

As I see in source of JDIC the send of POST data from the browser is disabled as the event EVENT_NAVIGATE_POST and EVENT_NAVIGATE_POSTDATA are not processed by the EventThread. Is this feature will be implemented in the next release?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
armin_chen
Offline
Joined: 2004-09-29

Jacob Strauss,

The EVENT_NAVIGATE_POST and EVENT_NAVIGATE_POSTDATA messages are ignored in IeEmbed's implementation. In MozEmbed's implementation they are processed. But I haven't test if it's work.

To implement "POST DATA", there are a lot of work to be done.
JDIC WebBrowser use socket to communicate between Java side and native Browser. And the implementation use 1024 bytes as the buffer, so every message should not bigger then 1KB. But "POST DATA" may send large block of data, and the data may not be represented by string. Worse still, the data send from Java side should be in some known format. We have to convert the String to a VARIANT data type. The method for IE is:
HRESULT Navigate( BSTR /url/, VARIANT */Flags/, VARIANT */TargetFrameName/, VARIANT */PostData/, VARIANT */Headers/ );
MSDN said that:
The post data specified by PostData is passed as a SAFEARRAY Data Type structure. The *VARIANT* should be of type VT_ARRAY and point to a *SAFEARRAY Data Type*. The *SAFEARRAY Data Type* should be of element type VT_UI1, dimension one, and have an element count equal to the number of bytes of post data.

The next release of JDIC 0.8.7 will be available soon, and the POST DATA for IeEmbed will still NOT implemented.

Any fixes or contributions to these issues are welcome!

Regards.
Armin.