Browse files

`\net\Message` should not trim the body.

  • Loading branch information...
1 parent 5f3d737 commit 27e8f652ba1691a56b9d6cd501eb55030b4df718 @gwoo gwoo committed Jul 26, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 net/Message.php
2 net/Message.php
@@ -110,7 +110,7 @@ public function body($data = null, $options = array()) {
$default = array('buffer' => null);
$options += $default;
$this->body = array_merge((array) $this->body, (array) $data);
- $body = trim(join("\r\n", $this->body));
+ $body = join("\r\n", $this->body);
return ($options['buffer']) ? str_split($body, $options['buffer']) : $body;

4 comments on commit 27e8f65


Just realized, that this change broke my cli-script for geocoding (via li3_geo) expecting serialized php data.
Why not trim the data?
And if not, where else?
After debugging with get/post sniffing, the yahoo service did not add any control characters at the end of the response (no \r\n nor \n nor any spacers) => so wy did li3 add \r\n ?

Union of RAD member

@dgAlien, you may want to open an rfc ticket for this as I'm not sure if it gets the right awareness here.

Regards, Mike

Union of RAD member

sounds like we might need to add an option for this. Can you show me how you are using it?

Please sign in to comment.