Week 9 & 10
UPDATE: I am more than happy to announce that I’ve been able to upload the images on to the wiki server!! The problem was not in form_data_post
but in http_post
(in my version of Octave’s repository). There were two faults:
- I was calling
http_action
which then used to callhttp_post
inturn which then POSTed the data, despite the fact that there was noPOSTFIELD
or POSTable data with me, it wasFORM
submission instead. I’ve now added theperform()
function in theform_data_post
itself so that I won’t need to interact with the former. - I had set the
Content-Length
parameter to get from the length of POSTFIELDS, which isn’t needed as of now.
Nevertheless, I’m pumped up again for furthering my work!
There has been some problem in completing the upload_to_wiki
script. Unfortunately, I’m unable to send the images on to the servers. Other than that, everything is working fine. I’ve been trying to do the same since the past week, but still no success, even after tracking down the cURL’s source code.
Basically we need to have a linked list of pointers to the information that we want to send as a form data. I tried to traverse that (It is native to cURL and unseen for the end user). Everything looks fine there. The only bottleneck that I can observe for now is, the form_data_post
function is not working as desired. I’ve tried all other alternatives to check where my code is not responding as per standards. But I think only the above function must have problem.
I also discussed this issue with the mentors and other people at IRC channel. However, there’s one more thing to it. The functionality that I’m currently using (CURLOPT_HTTPPOST) is deprecated now from cURL version 7.56 and instead MIME API is being used. (See this for more.) I asked Kai about this and he too agreed on the fact that I shuold be keeping backwards compatibilty, but then jwe and andy suggested me to use the latter funcitonality with MIME api and then make the feature available only to those who have cURL 7.56+. I’ll ask the mentor once again if either the problem gets solved for now and then I change it to MIME API once the work gets over, or I should instead do it now only.
Other than that, I will start implementing the RESTful services from now on, the other half part of the project. So, we’ll see how much of these functions that I’ve implemented so far get reused.
Until then! :-)
Link to BitBucket repo.