libcurl resume support - libcurl

Using libcurl, does anybody knows how to determine if a web server supports resuming?
I'm trying to make a custom update software which needs to determine if the web server supports resuming.
Thanks.

I assume you mean HTTP and then there's really no good way to know until you try it.

you can send a HEAD request firstly with RANGE header, then determine with the response header.

Related

Connecting Broadcom device to parse cloud

I am trying to connect my Broadcom device with the parse cloud, But I am not able to make it work. Does anybody know the procedure ? Please help me out with this problem. Thank you.
You may find this example enlightening.
Essentially, instantiate a TCPClient, connect to the proper URL and port, then build a RESTful request verbatim, using client.println() to send out the headers and a combination of sprintf() and client.print() to issue the data payload.

Webservice Response Ends with --UUID

I am using cxf framework in order to expose some web services.
When i tested it using soap-ui, it works great. But one of our customers that uses different soap client complains that the message ends with:
/soap:Envelope>
--uuid:91c5694a-93f5-404c-ab2b-8c220b7f289f--
I searched the web, and i found that this line apears not only in our system. But I couldn't figure out whether this suffix is valid and well-formed, or not.
Is there any reference that document this issue?
Is it really valid?
How can I remove it?
Thanks!
It sounds like you have MTOM enabled on the server side. In that case, the SOAP message is wrapped in mime wrappers (which is per spec). The --uuid thing is a marker of a mime part. If the client is having issues with those, then it sounds like that client cannot handle MTOM. You COULD turn MTOM off for those clients.

How to avoid QNetworkRequest to send the RHELP verb to the FTP Server?

The Scenario:
I'm implementing an FTP get functionality in my application, that uses Qt 4.7.x
Qt documentation states that the QFtp class is deprecated, to use QNetworkAccessManager instead, and so I'm doing ;) I tested the code I wrote with some FTP server out there and it seems to work fine.
The Problem:
When I connect to my local, homebrewed (and quite simple), ftp server using my ftp get class I get the following error: Request: 500 No Help Available.
I traced the ftp communication using tcpdump and actually I see that the QNetworkAccessManager/QNetworkRequest sends an HELP verb to the server, once it gets the 230 User Logged In
Unfortunately my server do not support that. Now is there a way to configure the Qt not to send the HELP verb? Reading the Qt Doc online for the involved classes did not helped.
There is probably no way to avoid this, unless you want to reimplement the FTP backend. By browsing the source code for the FTP backend, you can find out that the purpose for sending the HELP command is to find out if the server supports the "SIZE" and "MDTM" commands.
Probably the easiest solution would be to implement a minimal handler for HELP commands in your FTP server that responds with an appropriate 200/211/214 response.
EDIT: See http://qt.gitorious.org/qt/qt/blobs/4.8/src/network/access/qnetworkaccessftpbackend.cpp#line350 for what the backend expects from the response. It's not complicated.
It is not configurable.
You can see the source code of what's happening here: http://qt.gitorious.org/qt/qt/blobs/4.7/src/network/access/qnetworkaccessftpbackend.cpp#line300
If you can build your own version of Qt, then it can easily be suppressed. But it might be easier for you to upgrade your FTP server to support the HELP command.

When to use socket.io?

I am learning NodeJS and was able to make a server and an iPhone app that issues an HTTP GET request to the server and retrieve a JSON string from it. I didn't need to use socket.io for this. So why would I need to use it?
If you are just pulling JSON from the server your solution works fine. However suppose you want to push data from the server back to the client. Socket.io is a very elegant solution for doing this. Firstly because it handles the push side and secondly because it handles browser degradation gracefully as the 'jQuery of sockets'

Create a SOCKS Proxy that does nothing special

I am trying to create a SOCKS proxy in C++ that runs as a background process on localhost.
If the user's browser is configured to use the proxy, I want all HTTP requests to be passed along through the normal TCP/IP stack. i.e. The browser will behave exactly as it normally would.
Eventually I will add another layer which will check to see if the requested resource matches certain criteria, and if so will handle the request differently. But for now I'm just trying to solve the basic problem... how to create a SOCKS proxy that doesn't change anything?
I would look into the Squid project, depending on what you need it for.
http://www.squid-cache.org/
GPL licensed source.
Insanely nice for many good things.
Jacob
It is far easier to build a HTTP Proxy then a SOCKS4/SOCKS5 as HTTP protocol is human readable and SOCKS protocols are not. Here is an exemple of a HTTP proxy I build for experience some years ago. It used to work fine with old browsers, now its broken as it cannot handle persistent connections, but it still is a good source to learn how it works.
Maybe you rather use a already existing HTTP proxy software like Squid.