chiark / gitweb /
proper error reporting of post requests incl. to yarrg
authorIan Jackson <ian@liberator.relativity.greenend.org.uk>
Sat, 4 Sep 2010 14:12:17 +0000 (15:12 +0100)
committerIan Jackson <ian@liberator.relativity.greenend.org.uk>
Sat, 4 Sep 2010 14:16:46 +0000 (15:16 +0100)
commitcc270d577ac30ff93d3b6ba942f96a4cfd4c7c3d
tree5ac75c3b648ee2b2b90d4e2a21fc915f34963c9d
parentddd0261a33ef991c168b73a57c76500dde031744
proper error reporting of post requests incl. to yarrg

ClientHttpRequest.java:
* .post() returns a boolean saying whether the submission was
  successful; you have to call .resultstream() to get the stream.

MarketUploader.java:
* Factor out StringBuild and repeated readLine into new function
  readstreamstring.
* Report http errors occurring in sendInitialData (part of PCTB
  upload) and have it return "null" in that case.
* New helper function post_for_yarrg that does the post and puts up a
  dialogue box if it's not right.  Use it in the two relevant places.
src/com/tedpearson/ypp/market/MarketUploader.java
src/net/chiark/yarrg/ClientHttpRequest.java