Update http_and_coap_write.py

fixed bug with the last CoAP total byte size message