Changeset 62231ec0359b34f6a82b6688a7af97f2eb2ede10
- Timestamp:
- 08/29/10 15:19:50 (18 months ago)
- Author:
- Antti-Juhani Kaijanaho <antti-juhani@…>
- Children:
- c504199e7e127458fff243397776ee854e62b7a3
- Parents:
- 8fab37d78032b4009b127dc2d5c06b71a627ebd5
- git-committer:
- Antti-Juhani Kaijanaho <antti-juhani@…> (08/29/10 15:19:50)
- Message:
-
[msg::entity] Add a stub for get_decoded_body.
Signed-off-by: Antti-Juhani Kaijanaho <antti-juhani@…>
- Location:
- msg
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r868b365
|
r62231ec
|
|
| 1 | 1 | /* This file is part of Alue, the multiprotocol Internet discussion daemon |
| 2 | 2 | |
| 3 | | Copyright © 2009 Antti-Juhani Kaijanaho |
| | 3 | Copyright © 2009, 2010 Antti-Juhani Kaijanaho |
| 4 | 4 | |
| 5 | 5 | Alue is free software: you can redistribute it and/or modify it |
| … |
… |
|
| 239 | 239 | return rv; |
| 240 | 240 | } |
| | 241 | |
| | 242 | std::string entity::get_decoded_body() const |
| | 243 | { |
| | 244 | /* This here would decode content-transfer-encoding, |
| | 245 | but lacking realistic test cases I'm leaving this |
| | 246 | for later. */ |
| | 247 | return get_body(); |
| | 248 | } |
| 241 | 249 | } |
-
|
r19beb87
|
r62231ec
|
|
| 53 | 53 | std::string get_header() const; |
| 54 | 54 | std::string get_body() const { return body; } |
| | 55 | std::string get_decoded_body() const; |
| 55 | 56 | std::string get_entity() const { |
| 56 | 57 | return get_header() + "\r\n" + get_body(); |
-
|
r868b365
|
r62231ec
|
|
| 1 | 1 | /* This file is part of Alue, the multiprotocol Internet discussion daemon |
| 2 | 2 | |
| 3 | | Copyright © 2009 Antti-Juhani Kaijanaho |
| | 3 | Copyright © 2009, 2010 Antti-Juhani Kaijanaho |
| 4 | 4 | |
| 5 | 5 | Alue is free software: you can redistribute it and/or modify it |
| … |
… |
|
| 46 | 46 | void text_plain::init() |
| 47 | 47 | { |
| 48 | | std::string text = get_body(); |
| | 48 | std::string text = get_decoded_body(); |
| 49 | 49 | content_type ct = get_content_type(); |
| 50 | 50 | if (ct.get_type() != msg::content_type::TEXT || |