View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0005724 | Taler | twister | public | 2019-05-15 16:58 | 2019-12-20 19:12 |
Reporter | Marcello Stanisci | Assigned To | Marcello Stanisci | ||
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | closed | Resolution | fixed | ||
Product Version | git (master) | ||||
Target Version | 0.6 | Fixed in Version | 0.6 | ||
Summary | 0005724: code repetition and conflicting parameters. | ||||
Description | The Twister has some code repetition where both the POST and the PUT cases set the CURLOPT_INFILESIZE option. And more, this option sounds like conflicting -- or doing "the same thing" -- as CURLOPT_POSTFIELDSIZE. We should either not repeat the code, or cut entirely off the CURLOPT_INFILESIZE paths. | ||||
Tags | No tags attached. | ||||
|
As per manpage, CURLOPT_POSTFIELDSIZE should be used when the payload size should NOT be calculated by libcurl; for example, when binary files are being sent. That's due to the fact that libcurl uses strlen() to calculate that size. |
|
CURLOPT_INFILESIZE, OTOH, sounds like to be used when uploading *files*, that we also never do with the Twister. So in short, the two options look not important for the Twister. Agree? |
|
Well, testing confirms that POSTs want CURLOPT_POSTFIELDSIZE and PUTs want CURLOPT_INFILESIZE. The real optimization was to set all the options (including read/write callbacks) but the method on the easy handle *before* even checking which method we are going to perform, and set the method as a last step. This is not breaking, since if a method doesn't need a callback/option, it will ignore it. The gain is that all the common options set by the *three* methods (GET/POST/PUT) are mentioned in *one* place in the code, instead of three. Tested against the Twister testcase itself, and on exchange's and merchant's twisted tests. |
Date Modified | Username | Field | Change |
---|---|---|---|
2019-05-15 16:58 | Marcello Stanisci | New Issue | |
2019-05-15 16:58 | Marcello Stanisci | Status | new => assigned |
2019-05-15 16:58 | Marcello Stanisci | Assigned To | => Marcello Stanisci |
2019-06-03 20:27 | Marcello Stanisci | Note Added: 0014502 | |
2019-06-03 20:33 | Marcello Stanisci | Note Added: 0014503 | |
2019-06-03 21:17 | Marcello Stanisci | Note Added: 0014504 | |
2019-06-03 21:18 | Marcello Stanisci | Note Edited: 0014504 | |
2019-06-03 21:18 | Marcello Stanisci | Note Edited: 0014504 | |
2019-06-03 21:22 | Marcello Stanisci | Note Edited: 0014504 | |
2019-06-03 21:22 | Marcello Stanisci | Note Edited: 0014504 | |
2019-06-03 22:16 | Marcello Stanisci | Status | assigned => resolved |
2019-06-03 22:16 | Marcello Stanisci | Resolution | open => fixed |
2019-06-05 21:28 | Christian Grothoff | Product Version | => git (master) |
2019-06-05 21:28 | Christian Grothoff | Fixed in Version | => 0.6 |
2019-06-05 21:28 | Christian Grothoff | Target Version | => 0.6 |
2019-12-20 19:12 | Christian Grothoff | Status | resolved => closed |