Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
West Wind Internet Client Tools
Message
General information
Forum:
Visual FoxPro
Category:
West Wind Web Connection
Miscellaneous
Thread ID:
00856388
Message ID:
00881253
Views:
39
I use the wwIPStuff to send information to the server also some of the information is sent using HTTPGetEx. Like when we just need to send one record.

One of the things the POST does is return a value DONE if it was sent successfully. Otherwise it returns ERROR=Whatever. Then I just look to see what was returned so I can offer a message to the user. The strange part is DONE is returned even thought the file is not uploaded.

Again it just happens when the client is using a proxy server and its set to manual.

Ron

>You should use wwHttp not wwIPStuff since wwIPStuff has none of the proxy stuff implemented in it...
>
>Give that a try...
>
>+++ Rick ---
>
>>I have pasted the code below that I use to create the object we use to send the information.
>>
>>The proxy settings are set to manual for these clients.
>>
>>I don't think I missed anything and I am pretty sure the proxy part is working well cause they are able to send the first chunk of data. The second and other POSTs fail.
>>
>>Thanks again for any help in clarifying this,
>>
>>Ron
>>
>>
>>*==============================================================================
>>PROCEDURE Create_Internet_Object
>>LPARAMETER lcObjectName, lcCreateName
>>LOCAL lcProxyName, lcProxyPort, lnProxyType, lcProxyUser, lcProxyPW
>>IF !"WWIPSTUFF"$UPPER(SET("CLASSLIB"))
>>	SET CLASSLIB TO .\ww\wwIPStuff ADDITIVE
>>ENDIF
>>
>>IF ! "wwUtils"$SET("PROCEDURE")
>>	SET PROCEDURE TO .\ww\wwUtils ADDITIVE
>>ENDIF
>>
>>IF ! "WWTTP"$UPPER(SET("PROCEDURE"))
>>	SET PROCEDURE TO .\ww\WWHTTP ADDITIVE
>>ENDIF
>>
>>IF !EMPTY(lcObjectName) AND EMPTY(lcCreateName)
>>	MESSAGEBOX("Error passing parameters to Create_Internet_Object in Procfile call support.", 16)
>>	RETURN .F.
>>ENDIF
>>
>>IF EMPTY(lcObjectName)
>>	lcObjectName = "oInternet"
>>	lcCreateName = "wwIPStuff"
>>ENDIF
>>
>>RELEASE &lcObjectName.
>>PUBLIC &lcObjectName.
>>
>>&lcObjectName. = CREATE(lcCreateName)
>>IF VARTYPE(&lcObjectName.) <> "O" OR ISNULL(&lcObjectName.)
>>	RETURN .F.
>>ENDIF
>>
>>USE INFO ALIAS ProxyInfo IN 0 AGAIN
>>
>>lnConnectionTimeout = INT(VAL(ALLT(LOOKUP(ProxyInfo.Value, "connection_timeout", ProxyInfo.Field))))
>>IF !EMPTY(lnConnectionTimeout)
>>	&lcObjectName..nConnectTimeout = lnConnectionTimeout
>>ENDIF
>>
>>lnProxyType = INT(VAL(LOOKUP(ProxyInfo.Value, "proxy_type", ProxyInfo.Field)))
>>*!* RLT Added to auto detect the proxy settings
>>&lcObjectName..nhttpconnecttype = lnProxyType
>>
>>IF lnProxyType = 3	&& Manual Setting
>>	*!* Get the Proxy name and Port
>>	lcProxyName = ALLT(LOOKUP(ProxyInfo.Value, "proxy_name", ProxyInfo.Field))
>>
>>	*!* Get the port number to use.
>>	lcProxyPort = ALLT(LOOKUP(ProxyInfo.Value, "proxy_port", ProxyInfo.Field))
>>	IF !EMPTY(lcProxyPort)
>>		lcProxyName = lcProxyName + ":"+ lcProxyPort
>>	ENDIF
>>	&lcObjectName..cHttpProxyName = ALLT(lcProxyName)
>>	
>>	*!* Check for username and password.
>>	lcProxyUser = ALLT(LOOKUP(ProxyInfo.Value, "proxy_username", ProxyInfo.Field))
>>	IF !EMPTY(lcProxyUser)	
>>		&lcObjectName..cHttpProxyUserName = lcProxyUser
>>	ENDIF
>>	
>>	lcProxyPW = ALLT(LOOKUP(ProxyInfo.Value, "proxy_password", ProxyInfo.Field))
>>	IF !EMPTY(lcProxyPW)
>>		&lcObjectName..cHttpProxyPassword = lcProxyPW
>>	ENDIF
>>
>>ENDIF
>>
>>USE IN SELECT("ProxyInfo")
>>
>>RETURN .T.
>>
>>
>>>Hi Ronald,
>>>
>>>Posting to a new URL and POSTing in general should never go to cache either on the client or server as those sort of things are not cacheable. It only applies to GETs generally.
>>>
>>>However, you might want to look into proxy settings on wwHttp to make sure the Proxy isn't interfering with you.
>>>
>>>+++ Rick ---
>>>
>>>
>>>
>>>>Hi Rick,
>>>
>>>>
>>>>We are using the below code to send a file up to a web server from a client and it works well for a number of client. However, we run into an issue with a few clients that have proxies. We actually upload 3 files to the same IP address but different web pages we find it sends the first file and then skips the rest of the files. Our web guy thinks it has something to do with the cache so now we send the ?nocache= TTOC(DATETIME()) in hopes it would no cache the links but, it still does.
>>>>
>>>>Is there something I can send to clear the cache before sending the file?
>>>>
>>>>Is there something I am missing anywhere :)
>>>>
>>>>
>>>>*** Set mode to multi-part form
>>>>oHttp.nHttpPostMode = 2
>>>>
>>>>*** Post a file and a regular form variable
>>>>*!* Who is sending the message
>>>>oHttp.AddPostKey("snetid", lcSnetID)
>>>>oHttp.AddPostKey("attach", "1")
>>>>oHttp.AddPostKey("fileupload", lcUploadFile, .T.)
>>>>
>>>>lcHTML = oHttp.HTTPGet(SS_HSS_DIVISIONS_SITE + "?nocache=" + TTOC(DATETIME()))
>>>>
>>>>
>>>>
>>>>
>>>>Thanks for the help,
Ronald L. Thorp
http://www.Fox-Pros.com
Fox-Pros, Inc.
Office 407-498-0100
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform