HalosGhost / pbpst

A command-line libcurl C client for pb deployments
GNU General Public License v2.0
44 stars 9 forks source link

pbpst says "Paste deleted" even when you pass it a silly UUID #67

Closed HalosGhost closed 8 years ago

HalosGhost commented 8 years ago

This happens because pbpst does not check the HTTP status code response from pb on -Ru. Instead, if the status code returned from curl_easy_perform() is CURLE_OK, it assumes everything went as-planned.

The best way to solve this would be to check that the HTTP response code for -Ru is 200 (at which point, we know that there was a paste and that it was deleted).