PHP email attachment not going through - email

Not sure what I'm missing here, must be something small.. I removed the SMTP/IP/SERVER stuff from the top. I also don't know why SMTP is adding the boundary at the end with "--" at the end, that part I didn't include in body. Server is EC2 Amazon Linux.
Date: Fri, 13 Jul 2012 00:33:15 -0400
To: X#X.com
Subject: Customer Order #100002
X-PHP-Originating-Script: 222:functions.php
From: X#X.com
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="-----=ee483485be490cf4afcc323ac23e7a53"
Content-Type: application/octet-stream; name="ShippingLabel_100002.gif"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="ShippingLabel_100002.gif"
R0lGODdhIAOwBPAAAP///wAAACwAAAAAIAOwBAAC/4SPqcvtD6OctNqLs968+w+GIhSU44mm6sq2
7gvH8kzX9o2zZZD3/g8MCofEovGITCp2yqbzCY1Kp9SqtcW8ardc3O5r6orH5LIn+wAnwkseBYyG
sQ/fRnhOd+MX+7r5bwEXB0hYaMg1yCeYx7CXJugWEcmBB9eoN8kI4LiWaXkI2hk6SlralNg5ycZ5
UcmK8PrmaoB6l0mL+eiJeWtqFusbLDycggp7a/vR19vW4Yd7rAjdvMmMO4dtTawFvO39DS4Zuzzt
3Avc/VgdrSm6Ts1qks0ejmgtH/mMb7uqXf8PMImxdtL05RroKFsWNddU3SsnDd65XI0gUgtoJZ6f
T/+LOPrDCDJkjoF5Ei56d/IivY4bGb5z8MqkxWnotKUTSQQSQZS8Su7ECTToDZIl4yxMVq2nSk3z
XvKsoPHSzKfqpAqFohPivKZTr3r9Wuymy6ZIp8psQ9HpTafHmJVlV/PSR7A/ohLER48t3b18Ka29
ppUi17x3Gfb7JMHkvbRwPyrui8RuYLUOIVu+DPUvzcpUzU4s2jlr4s92GDN1TBrzEMmUW/9UDRs2
UXKu355tO/mlZsJ6+3nuynt3bCyL8+ItPDy57HHIGCMd/NP3aeQTZl3klwr4TuHKVbCmOph79/Hg
iLqurZSTq3zsnSsdvUZu0sLsSXgiX7d426PGTeP//4+ReaKRxcszqSCW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chHQjKSkpwkJStpyUtiMpOa3CQnO+nJT4IylKIc
JSlLacpTojKVqlwlK1vpylfCDDKWspwlLWtpS58UAAA7AAAAAAAAAAAA
-----=ee483485be490cf4afcc323ac23e7a53
-------=ee483485be490cf4afcc323ac23e7a53--

Got it to work... I knew it was something small. Don't forget the boundaries include two extra --'s to split correctly.

Related

Delphi/Indy 10 - Sending a text or HTML email with attachments adds an attachment for the text (body) itself

For years, we've been using Indy 10 to send emails (text, not HTML) with one or more PDF attached to it and we never had any problem.
Recently (maybe since Tokyo release 3 ?), our customers noticed that the text part of the email (body) is now an attachment and not part of the email itself.
I've searched the Internet for solutions, and everything I tested did not fix this problem.
I tried some of the solutions proposed on StackOverflow by Remy Lebeau with no success.
Here's the code (based on a post found on StackOverflow)
procedure TForm1.btnSendEmailClick(Sender: TObject);
var
smtp : TIdSMTP;
msg : TidMessage;
builder: TIdMessageBuilderHtml;
begin
msg := TidMessage.Create(nil);
try
builder := TIdMessageBuilderHtml.Create();
try
// FIsBodyHtml IS FALSE
if FIsBodyHtml then begin
builder.Html.Text := edText.Lines.Text;
builder.HtmlCharSet := 'utf-8';
builder.HtmlContentTransfer := 'quoted-printable';
end else begin
builder.PlainText.Text := edText.Lines.Text;;
builder.PlainTextCharSet := 'utf-8';
builder.PlainTextContentTransfer := 'quoted-printable';
end;
// Add attached file here
if (edFile.Text <> '') and FileExists(edFile.Text) then begin
builder.Attachments.Add(edFile.Text);
end;
builder.FillMessage(msg);
finally
builder.Free;
end;
msg.From.Name := 'From name here';
msg.From.Address := 'From email address here';
msg.Subject := edSubject.Text;
msg.Recipients.EmailAddresses := edEMail.Text;
// msg.CCList.EmailAddresses := CCAddresses;
// msg.BccList.EmailAddresses := BCCAddresses;
smtp := TIdSMTP.Create(nil);
try
smtp.Host := 'Host IP here';
// Smtp.UseTLS := utNoTLSSupport;
smtp.Port := 25;
// smtp.Username := '';
// smtp.Password := '';
// smtp.AuthType := satDefault;
smtp.Connect();
try
smtp.Send(msg);
finally
smtp.Disconnect;
end;
finally
smtp.Free();
end;
finally
msg.Free();
end;
ShowMessage('EMail with attachment sent.');
end;
RAW data BEFORE our service provider changed something :
X-Spam-Flag: NO
X-Envelope-From: stephans#xys.com
Return-Path: <stephans#xyz.com>
Received: from alt44.smtp-out.videotron.ca (alt44.smtp-out.videotron.ca [23.233.128.31])
by mail124c7.megamailservers.com (8.14.9/8.13.1) with ESMTP id w8IE2EaJ031620
for <stephans#xyz.com>; Tue, 18 Sep 2018 10:02:16 -0400
Received: from STEPHANS (99.99.99.99])
by Videotron with SMTP
id 2GZxgRaQACk662GZygKZJC; Tue, 18 Sep 2018 10:02:14 -0400
Message-ID: <0575a0d8ec54a7560be55a121df5deb7#smtp.videotron.ca>
X-Authority-Analysis: v=2.3 cv=I/dLuuog c=1 sm=1 tr=0
a=dE52as2XWJrk6k5j72Z8kA==:117 a=dE52as2XWJrk6k5j72Z8kA==:17
a=9DvhAHx2yrWFMPxQWpQA:9 a=ddwX9jWfLaJL_gwCi7EA:9 a=QEXdDO2ut3YA:10
a=x4g3fk4yahj5Vy8AyNEA:9 a=n3BslyFRqc0A:10 a=QGevMSd5eboA:10
From: "Stephan St-Denis" <stephans#xyz.com>
Subject: Sending an email with an attachment
To: stephans#xyz.com
Content-Type: multipart/mixed; boundary="sYOn6pS43NerAC6V2swiiWL68DI9=_SoRR"
MIME-Version: 1.0
Date: Tue, 18 Sep 2018 10:02:11 -0400
X-CMAE-Envelope: MS4wfKOiVw8oDz+nXCTnbMSWSKyXaMU478wM3VDSWQBABhzflbVLGHq70qeoq1ROGHLKj2lDQPx1LLDrcmvbcOtrdhj4j8xx2kLFmh3LfsDxgKpXpd44Lyvy
UHG4KDKHPNZy4UAAlgA05WwJ7eshsOWamzFhqA3QrXuliQNQVttLQNbhbjg2fqOR387/8VrwqftGFg==
X-CTCH-Spam: Unknown
X-CTCH-VOD: Unknown
X-CTCH-RefID: str=0001.0A020201.5BA10569.0015,ss=1,re=0.000,recu=0.000,reip=0.000,vtr=str,vl=0,cl=1,cld=1,fgs=0
X-CSC: 0
X-CHA: v=2.3 cv=TIBrtWta c=1 sm=1 tr=0 a=C7+rQaujYuxIIavLKnSTDg==:117
a=dE52as2XWJrk6k5j72Z8kA==:17 a=dueAcN81E1cA:10 a=JBFolyDoGHsA:10
a=9DvhAHx2yrWFMPxQWpQA:9 a=ddwX9jWfLaJL_gwCi7EA:9 a=QEXdDO2ut3YA:10
a=x4g3fk4yahj5Vy8AyNEA:9 a=n3BslyFRqc0A:10 a=QGevMSd5eboA:10
X-WHL: LR
X-EsetId: 37303A298E2AB560627366
This is a multi-part message in MIME format
--sYOn6pS43NerAC6V2swiiWL68DI9=_SoRR
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline;filename="Attachment"
This is the text that will be sent along with the attached file. This =
email is in text only format and not HTML.
The text should not be attached but should be part of the email.
--sYOn6pS43NerAC6V2swiiWL68DI9=_SoRR
Content-Type: application/pdf;
name="Embarcadero.pdf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="Embarcadero.pdf"
Content-ID: <Embarcadero.pdf>
JVBERi0xLjYKJf////8gd3d3LnN5bmFjdGlzLmNvbQoxIDAgb2JqCjw8Ci9DcmVhdGlvbkRhdGUo
RDoyMDE3MDIxNDE2MjAyMykKL1RpdGxlKENhc19kZV90ZXN0X0NBMS5wZGYpCi9BdXRob3IoTWFj
Q3JhemVlIEluYy4pCi9Qcm9kdWNlcihQREZCb3ggdmVyc2lvbiBpbnRlcm5lIExQQykKL0NyZWF0
b3IoTGVzIFByb2dpY2llbHMgQ29uY2VwdCBpbmMuKQo+PgplbmRvYmoKNSAwIG9iago8PAovTGVu
Z3RoIDMyNTcKPj4Kc3RyZWFtCkJUCi9GMCAxMiBUZgowIDAgMCByZwowIFRjCjE5Ljg0MyA3NjUu
MDAyIFRkCiggICAgPVJFTEVWRSBERSBUUkFOU0FDVElPTj0pIFRqCkVUCkJUCi9GMCAxMiBUZgow
IDA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L1BhZ2VzCi9LaWRzWwo0IDAgUgpdCi9Db3VudCAxCi9S
ZXNvdXJjZXMgMyAwIFIKPj4KZW5kb2JqCjMgMCBvYmoKPDwKL1Byb2NTZXRbL1BERi9UZXh0L0lt
YWdlQ10KL0ZvbnQ8PAovRjAgOCAwIFIKPj4KPj4KZW5kb2JqCnhyZWYKMCAxMAowMDAwMDAwMDAw
IDY1NTM1IGYNCjAwMDAwMDAwMzIgMDAwMDAgbg0KMDAwMDAwNDI4MyAwMDAwMCBuDQowMDAwMDA0
MzU3IDAwMDAwIG4NCjAwMDAwMDM1MjIgMDAwMDAgbg0KMDAwMDAwMDIxMyAwMDAwMCBuDQowMDAw
MDAzNjA3IDAwMDAwIG4NCjAwMDAwMDM5MTEgMDAwMDAgbg0KMDAwMDAwNDA2MiAwMDAwMCBuDQow
MDAwMDA0MjM1IDAwMDAwIG4NCnRyYWlsZXIKPDwKL1NpemUgMTAKL1Jvb3QgOSAwIFIKL0luZm8g
MSAwIFIKL0lEWyg0Mjc4MDY4MDhzZWVkKSg0Mjc4MDY4MDhzZWVkKV0KPj4Kc3RhcnR4cmVmCjQ0
MjYKJSVFT0YK
--sYOn6pS43NerAC6V2swiiWL68DI9=_SoRR--
RAW data AFTER our service provider changed something
X-Spam-Flag: NO
X-Envelope-From: stephans#xyz.com
Return-Path: <stephans#xyz.com>
Received: from alt14.smtp-out.videotron.ca (alt14.smtp-out.videotron.ca [135.19.0.27])
by mail141c7.megamailservers.com (8.14.9/8.13.1) with ESMTP id w8JCvhOr015926
for <stephans#xyz.com>; Wed, 19 Sep 2018 08:57:45 -0400
Received: from STEPHANS ([99.99.99.99])
by Videotron with SMTP
id 2c34gzZ4bMdc62c35g1R7X; Wed, 19 Sep 2018 08:57:43 -0400
Message-ID: <5283e5cb2949102f2e22f509477dacaa#smtp.videotron.ca>
X-Authority-Analysis: v=2.3 cv=PoG9kTE3 c=1 sm=1 tr=0
a=dE52as2XWJrk6k5j72Z8kA==:117 a=dE52as2XWJrk6k5j72Z8kA==:17
a=9DvhAHx2yrWFMPxQWpQA:9 a=PyNp0P9dkJ191ZjJjSMA:9 a=ddwX9jWfLaJL_gwCi7EA:9
a=QEXdDO2ut3YA:10 a=x4g3fk4yahj5Vy8AyNEA:9 a=n3BslyFRqc0A:10 a=QGevMSd5eboA:10
From: "Stephan St-Denis" <stephans#xyz.com>
Subject: Sending an email with an attachment
To: stephans#xyz.com
Content-Type: multipart/mixed; boundary="2oubkSu12F4FBVsrQ1qmkA=_rIo3IvFYNM"
MIME-Version: 1.0
Date: Wed, 19 Sep 2018 08:57:42 -0400
X-CMAE-Envelope: MS4wfBPFtECskEptewv8r0bLuVgVpcybKuamQgK0q+veOE3mDcPmuU0j2BlwRMolPNl4KeDVRtyCVMVmkK8N5jufk8voKnE1l6SnBAVceHp6p6Ohg6KTOIp1
srRHBcfqKq4iTOHzsbt4HfC5vzAuQXm6H3d2pHYX2JNz8N1Pq6ze3mdvvacTtuYNEbvI0Ny8ev9LrA==
X-CTCH-Spam: Unknown
X-CTCH-VOD: Unknown
X-CTCH-RefID: str=0001.0A02020C.5BA247CA.0005,ss=1,re=0.000,recu=0.000,reip=0.000,vtr=str,vl=0,cl=1,cld=1,fgs=0
X-CSC: 0
X-CHA: v=2.3 cv=feyDNXYF c=1 sm=1 tr=0 a=csAb9/S9F4eoTzVqV71Dmw==:117
a=dE52as2XWJrk6k5j72Z8kA==:17 a=WrA80cmexyYA:10 a=JBFolyDoGHsA:10
a=9DvhAHx2yrWFMPxQWpQA:9 a=PyNp0P9dkJ191ZjJjSMA:9 a=ddwX9jWfLaJL_gwCi7EA:9
a=QEXdDO2ut3YA:10 a=x4g3fk4yahj5Vy8AyNEA:9 a=n3BslyFRqc0A:10
a=QGevMSd5eboA:10
X-WHL: LR
X-EsetId: 37303A298E2AB560627264
This is a multi-part message in MIME format
--2oubkSu12F4FBVsrQ1qmkA=_rIo3IvFYNM
Content-Type: multipart/alternative;
boundary="DhsioUcQxViR3rGTk=_q17PSufSL3rps7M"
--DhsioUcQxViR3rGTk=_q17PSufSL3rps7M
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
An HTML viewer is required to see this message
--DhsioUcQxViR3rGTk=_q17PSufSL3rps7M
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
This is the text that will be sent along with the attached file. This =
email is in text only format and not HTML.
The text should not be attached but should be part of the email.
--DhsioUcQxViR3rGTk=_q17PSufSL3rps7M--
--2oubkSu12F4FBVsrQ1qmkA=_rIo3IvFYNM
Content-Type: application/pdf;
name="Embarcadero.pdf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="Embarcadero.pdf"
Content-ID: <Embarcadero.pdf>
JVBERi0xLjYKJf////8gd3d3LnN5bmFjdGlzLmNvbQoxIDAgb2JqCjw8Ci9DcmVhdGlvbkRhdGUo
RDoyMDE3MDIxNDE2MjAyMykKL1RpdGxlKENhc19kZV90ZXN0X0NBMS5wZGYpCi9BdXRob3IoTWFj
Q3JhemVlIEluYy4pCi9Qcm9kdWNlcihQREZCb3ggdmVyc2lvbiBpbnRlcm5lIExQQykKL0NyZWF0
b3IoTGVzIFByb2dpY2llbHMgQ29uY2VwdCBpbmMuKQo+PgplbmRvYmoKNSAwIG9iago8PAovTGVu
Z3RoIDMyNTcKPj4Kc3RyZWFtCkJUCi9GMCAxMiBUZgowIDAgMCByZwowIFRjCjE5Ljg0MyA3NjUu
MDAyIFRkCiggICAgPVJFTEVWRSBERSBUUkFOU0FDVElPTj0pIFRqCkVUCkJUCi9GMCAxMiBUZgow
IDAgMCByZwowIFRjCjE5Ljg0MyA3NTMuMDk3IFRkCiggICAgID09VFJBTlNBQ1RJT04gUkVDT1JE
PT0pIFRqCkVUCkJUCi9GMCAxMiBUZgowIDAgMCByZwowIFRjCjE5Ljg0MyA3NDAuOTA4IFRkCihU
UFYyMjAzNjIzOSAgICAgICAgTUFSQ0g1MDAwMjEwNSkgVGoKRVQKQlQKL0Y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Y1NTM1IGYNCjAwMDAwMDAwMzIgMDAwMDAgbg0KMDAwMDAwNDI4MyAwMDAwMCBuDQowMDAwMDA0
MzU3IDAwMDAwIG4NCjAwMDAwMDM1MjIgMDAwMDAgbg0KMDAwMDAwMDIxMyAwMDAwMCBuDQowMDAw
MDAzNjA3IDAwMDAwIG4NCjAwMDAwMDM5MTEgMDAwMDAgbg0KMDAwMDAwNDA2MiAwMDAwMCBuDQow
MDAwMDA0MjM1IDAwMDAwIG4NCnRyYWlsZXIKPDwKL1NpemUgMTAKL1Jvb3QgOSAwIFIKL0luZm8g
MSAwIFIKL0lEWyg0Mjc4MDY4MDhzZWVkKSg0Mjc4MDY4MDhzZWVkKV0KPj4Kc3RhcnR4cmVmCjQ0
MjYKJSVFT0YK
--2oubkSu12F4FBVsrQ1qmkA=_rIo3IvFYNM--
We have the same sort of problem with Microsoft Mail. It is caused by the "Content-Disposition: inline" line in the text part which causes MS Mail to show the text part as a downloadable attachment. Removing the Content-Disposition line fixes this but requires you to modify TIdMessageClient.SendBody. Frankly I think MS Mail is to blame.

Attachment missing in MTOM response from Citrus SOAP server simulation

I have built a sample Citrus testcase to simulate a SOAP server that responds with an MTOM attachment.
runner.soap(action -> action.server("simulationServer")
.receive()
...[validation etc]
);
runner.soap(action -> action.server("simulationServer")
.send()
.name("get-response")
.mtomEnabled(Boolean.TRUE)
.attachment("myAttachment", "application/octet-stream", new ClassPathResource("testfiles/myAttachment.pdf"))
.payload("<getResponse xmlns:xmime=\"http://www.w3.org/2005/05/xmlmime\">\n" +
" <document>\n" +
" <contentElements>\n" +
" <contentElement xmime:contentType=\"application/pdf\">cid:myAttachment</contentElement>\n" +
" </contentElements>\n" +
" <id>Test</id>\n" +
" </document>\n" +
"</getResponse>\n")
);
When I run this test and call the Citrus simulation with SoapUI, I see the contents of myAttachment.pdf in the debug logs. So at least it looks like Citrus tries to send the attachment.
However, in SoapUI I do not get an attachment. There is a XOP element in the SOAP response, but no attachment. The RAW view of SoapUI of the Citrus response looks like this.
HTTP/1.1 200 OK
Date: Tue, 16 Jan 2018 15:30:36 GMT
Accept: text/xml, text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
SOAPAction: ""
Content-Type: Multipart/Related; boundary="----=_Part_0_382348859.1516116636524"; type="application/xop+xml"; start-info="text/xml"
Transfer-Encoding: chunked
Server: Jetty(9.4.6.v20170531)
------=_Part_0_382348859.1516116636524
Content-Type: application/xop+xml; charset=utf-8; type="text/xml"
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Header/><SOAP-ENV:Body><getResponse xmlns:xmime="http://www.w3.org/2005/05/xmlmime">
<document>
<contentElements>
<contentElement xmime:contentType="application/pdf"><xop:Include xmlns:xop="http://www.w3.org/2004/08/xop/include" href="cid:myAttachment"/></contentElement>
</contentElements>
<id>Test</id>
</document>
</getResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>
------=_Part_0_382348859.1516116636524--
In an MTOM response with attachment the attachment starts where this RAW view ends. It should continue like this
------=_Part_0_382348859.1516116636524-- [last line from above]
Content-Type: application/pdf
Content-Transfer-Encoding: binary
Content-ID: <myAttachment>
%PDF-1.4... [PDF content]
I am using Citrus 2.7.2 release.
Update
Still no success on this. Wireshark shows the same picture as SoapUI: the attachment is missing in the response.
However, when I debug into the code on the server (Citrus) side, I see the attachment in the response message until I get lost somewhere in a MessageSendingTemplate. Same on the console log. The message has the attachment.
There is an inline MTOM variant in the Citrus documentation, but I can't find a way to set this mtom-inline on the attachment in Java config.
Any hints, where to set a breakpoint to find where the attachment get lost? Or any other suggestions/examples on the Citrus side?
The setMtomInline field sits on the SoapAttachment interface. I am not sure if I got the setup right - but seems to work for inlined attachements - fails for soap attachements / multipart. The SoapUI Mock does not show any attachements when receiving requests from following testcase.
SoapAttachment soapAttachment = new SoapAttachment();
soapAttachment.setMtomInline(false);
soapAttachment.setContentResourcePath("log4j.xml");
soapAttachment.setContentType("application/octet-stream");
soapAttachment.setContentId("FILE");
SoapMessage soapMessage = new SoapMessage();
soapMessage.mtomEnabled(true);
soapMessage.soapAction("/HelloService/sayHello");
soapMessage.setPayload(
"<ht:HelloRequest " +
"xmlns:ht=\"http://citrusframework.org/schemas/samples/HelloMtomService\" " +
"xmlns:xop=\"http://www.w3.org/2004/08/xop/include\" >\n" +
" <ht:Message>Hei .. citrus does stream mtom</ht:Message>\n" +
" <ht:Data><xop:Include href=\"cid:FILE\"/></ht:Data>\n" +
"</ht:HelloRequest>");
soapMessage.addAttachment(soapAttachment);
runner.soap(action -> {
action.client("helloMtomSoapuiClient")
.send()
.soapAction("/HelloService/sayHello")
.message(soapMessage);
});
If I do the same for MtomInline set to true, I see the attachement as base64 encoded content text in the ht:Data node.
SoapAttachment soapAttachment = new SoapAttachment();
soapAttachment.setContentResourcePath("log4j.xml");
soapAttachment.setMtomInline(true);
soapAttachment.setContentType("application/xml");
soapAttachment.setContentId("MyAttachement");
soapAttachment.setEncodingType("base64Binary");
runner.soap(action -> {
action.client("helloMtomSoapuiClient")
.send()
.soapAction("/HelloService/sayHello")
.mtomEnabled(true)
.payload("<ht:HelloRequest xmlns:ht=\"http://citrusframework.org/schemas/samples/HelloMtomService\">\n" +
" <ht:Message>Hei .. citrus does mtom</ht:Message>\n" +
" <ht:Data>cid:MyAttachement</ht:Data>\n" +
"</ht:HelloRequest>")
.attachment(soapAttachment);
});
Either soapUI or citrus swallows the attachement. Some help or working JavaDSL sample would be nice.
It was actually a bug that will be fixed in Citrus 2.7.4 release. See https://github.com/christophd/citrus/issues/328
The inline MTOM variant with XML config works for me in the current release.
<ws:send endpoint="simulationServer" mtom-enabled="true">
<message>
<resource file="testfiles/simulation/get-response.xml" />
</message>
<ws:attachment content-id="myAttachment" content-type="application/octet-stream" mtom-inline="true" encoding-type="base64Binary">
<ws:resource file="classpath:testfiles/myAttachment.pdf"/>
</ws:attachment>
</ws:send>

Does openstack4j support set header when upload image?

I have some problem about OpenStack swift object storage. I want to set an expiration for objects. I use openstack4j. My upload object code
public void add(String objectName, InputStream imageStream) {
OSClientV3 clientV3 = OSFactory.clientFromToken(swiftOS.getToken());
Map<String, String> metaData = new HashMap<>();
metaData.put("X-Delete-After", "120");
ObjectPutOptions objectPutOptions = ObjectPutOptions.create();
objectPutOptions.metadata(metaData);
clientV3.objectStorage().objects().put(container, objectName,
Payloads.create(imageStream), objectPutOptions);
}
But it doesn't work.
Then I tried to use swift command line.
swift stat test test-19b8e4d4-1085-490d-b866-97f0ada0d46c
What I get is
Account: AUTH_01d73f1e49ed4dfd9535c831eed4ccf9
Container: test
Object: test-19b8e4d4-1085-490d-b866-97f0ada0d46c
Content Type: application/octet-stream
Content Length: 2414
Last Modified: Wed, 20 Dec 2017 07:58:56 GMT
ETag: 1cb55838010ed189c0698b6b5cade3ed
Meta X-Delete-After: 120
X-Openstack-Request-Id: tx4f1f57ef08e34d9296bfd-005a3a184b
X-Timestamp: 1513756735.97761
X-Trans-Id: tx4f1f57ef08e34d9296bfd-005a3a184b
Accept-Ranges: bytes
When I upload an object by
swift upload test test.jpg -H "X-Delete-After: 120"
and then
swift stat test test.jpg
What I get is
Account: AUTH_01d73f1e49ed4dfd9535c831eed4ccf9
Container: test
Object: test.jpg
Content Type: application/octet-stream
Content Length: 1688
Last Modified: Wed, 20 Dec 2017 08:03:20 GMT
ETag: 8a2d75ff8db40610a52a492abac09d3b
Meta Mtime: 1513755398.217256
X-Delete-At: 1513757119
Accept-Ranges: bytes
X-Timestamp: 1513756999.02865
X-Trans-Id: txc016e1aff901450aa934b-005a3a194c
X-Openstack-Request-Id: txc016e1aff901450aa934b-005a3a194c
It is like openstack document said.
The X-Delete-After header takes an integer number of seconds.
The proxy server that receives the request will convert this
header into an X-Delete-At header using its current time plus
the value given.
But why openstack4j doesn't work?
Looks like we can use
objectPutOptions.getOptions().put("X-Delete-After", "120");
As the getOptions call returns the headers map straight up.
You should use header instead of metadata:
objectPutOptions.header("X-Delete-After", "120");

powershell invoke-webrequest with codepage win 1251

I need to get data from a page that has the win-1251 codepage.
$SiteAdress = "http://www.gisinfo.ru/download/download.htm"
$HttpContent = Invoke-WebRequest -URI $SiteAdress
echo $HttpContent
And it shows me:
> StatusCode : 200 StatusDescription : OK Content :
> <!DOCTYPE html>
> <html><!-- #BeginTemplate "/Templates/panorama.dwt" --><!-- DW6 -->
> <head>
> <!-- #BeginEditable "doctitle" -->
> <title>ÃÈÑ ÏÀÍÎÐÀÌÀ - Ñêà÷àòü ïðîãðàììû</title>
> <meta name="keywords" con... RawContent : HTTP/1.1 200 OK
> Transfer-Encoding: chunked
> Connection: keep-alive
> Keep-Alive: timeout=20
> Content-Type: text/html
> Date: Fri, 16 Oct 2015 12:40:45 GMT
> Server: nginx/1.5.7
> X-Powered-By: PHP/5.2.17...
Title is Cyrillic. I have tried the variant below, but the result is the same.
$HttpContent = Invoke-WebRequest -URI $SiteAdress -ContentType "text/html; charset=windows-1251"
The -ContentType parameter to Invoke-WebRequest sets the content type for the request, not the response. Since you don't sent any content with your request it's quite irrelevant here.
I didn't find an easy way of enforcing a particular encoding for the response. Since the encoding is only specified within the HTML, and not the response header, there's little you can do here, I fear, as Invoke-WebRequest isn't smart enough to figure that out on its own.
You can, however, convert the text you read:
filter Convert-Encoding {
$1251 = [System.Text.Encoding]::GetEncoding(1251)
$1251.GetString([System.Text.Encoding]::Default.GetBytes($_))
}
$HttpContent.Content | Convert-Encoding
will then yield the proper Cyrillic text.
<!DOCTYPE html>
<html><!-- #BeginTemplate "/Templates/panorama.dwt" --><!-- DW6 -->
<head>
<!-- #BeginEditable "doctitle" -->
<title>ГИС ПАНОРАМА - Скачать программы</title>
<meta name="keywords" content="ГИС, карта, геодезия, картография, фотограмметрия, топография, электронная карта, классификатор, трехмерное моделирование, модель местности, карта Москвы, Ногинск, кадастр, межевое дело, Гаусс, эллипсоид Красовского, 1942, оротофотоснимок, WGS, растр, план, схема, бланковка, фотодокумент, земля, право, документация, map, sit, mtw, mtr, rsw, rsc, s57, s52, gis, 2003, 2004, Tool, Kit">
<meta name="description" content="Новые версии ГИС Карта 2000, GIS ToolKit , СУРЗ Земля и Право, документации, библиотек и примеров электронных карт">
<!-- #EndEditable -->
In any case, you need to know the exact encoding beforehand, regardless of how you solve it. You could try finding it in the HTML source, though:
[Regex]::Matches($HttpContent.Content, 'text/html;\s*charset=(?<encoding>[1-9a-z-]+)')
[System.Text.Encoding]::GetEncoding can cope with a string like windows-1251, at least.
My working variant:
$client = New-Object System.Net.WebClient
$url = "http://www.gisinfo.ru/download/download.htm"
$results = [System.Text.Encoding]::GetEncoding('windows-1251').GetString([Byte[]]$client.DownloadData($url))
Thanks Joey for help

How to format the HTTP response

I have written a socket program in C. I used this program as a chat server/client using TCP. I tried to change the chat server to use it as a HTTP server by changing the port to 80. I referred to the HTTP request/response format in http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Example_session , and made my program to reply with sample response. I tried the url
http://127.0.0.1/
in browser. My program read the request and replied with response. At first, I used google-chrome. Chrome didn't load the page correctly until i added the correct data length in Content-Length header. After setting content length header, chrome loaded the page correctly. But, firefox doesn't load the page. Firefox doesn't showed any errors, but still loading the page like it is still waiting for some data. Only When i stop the server or close the socket, complete page is loaded. I tried to follow rfc2616 https://www.rfc-editor.org/rfc/rfc2616 , and made the response exactly , but the still the results are same.
Request:
GET / HTTP/1.1\r\nHost: 127.0.0.1:8080\r\nUser-Agent: Mozilla/5.0
(X11; Ubuntu; Linux x86_64; rv:33.0) Gecko/20100101
Firefox/33.0\r\nAccept:
text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8\r\nAccept-Language:
en-US,en;q=0.5\r\nAccept-Encoding: gzip, deflate\r\nConnection:
keep-alive\r\n\r\n
For the above request, my program write to the socket with following response & content.
Response:
HTTP/1.1 200 OK\r\nCache-Control : no-cache, private\r\nContent-Length
: 107\r\nDate : Mon, 24 Nov 2014 10:21:21 GMT\r\n\r\n
Content:
<html><head><title></title></head><body>TIME : 1416824843 <br>DATE: Mon Nov 24 15:57:23 2014 </body></html>
This response is loading in Chrome, but not in firefox. Chrome is loading the page instantly whereas firefox is waiting for data. Note that the data length 107 is specified in the header. I donot have any addons enabled in firefox. My firefox version is in the request. Chrome version: Version 38.0.2125.111 (64-bit).
Code:
void *socket_read(void *args)
{
int socket,*s,length;
char buf[1024];
s=(int *)args;
socket=*s;
while(1){
buf[0]='\0';
length=read(socket,buf,1024);
if(length==0)
break;
else if(length==-1){
perror("Read");
return;
}
else{
printf("Request: %s\n",buf);
send_response(socket);
}
}
printf("End of read thread [%d]\n",socket);
}
int start_accept(int port)
{
int socket,csocket;
pthread_t thread;
struct sockaddr_in client;
socklen_t addrlen=sizeof(client);
pthread_attr_t attr;
socket=create_socket(port);
while(1){
if((csocket=accept(socket,(struct sockaddr *)&client,&addrlen))==-1)
{
perror("Accept");
break;
}
pthread_attr_init(&attr);
if(0!=pthread_create(&thread,&attr,socket_read,&csocket))
{
perror("Read thread");
return;
}
usleep(10000);
}
}
void send_response(int socket)
{
char buf1[1024];
int content_length;
char buf2[1024]="<html><head><title></title></head><body>TIME : 1416824843 <br>DATE: Mon Nov 24 15:57:23 2014 </body></html>";
content_length=strlen(buf2);
sprintf(buf1,"HTTP/1.1 200 OK\r\nCache-Control : no-cache, private\r\nContent-Length : %d\r\nDate : Mon, 24 Nov 2014 12:03:43 GMT\r\n\r\n",content_length);
printf("Written: %d \n",write(socket,buf1,strlen(buf1)));
fflush(stdout);
printf("Written: %d \n",write(socket,buf2,content_length));
fflush(stdout);
}
I have found the problem.
The Response is incorrect. There should not be any spaces between the header field name and colon(':'). Found this in http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2 .
My correct response is
HTTP/1.1 200 OK\r\nCache-Control: no-cache, private\r\nContent-Length: 107\r\nDate: Mon, 24 Nov 2014 10:21:21 GMT\r\n\r\n
I had put a space between 'Content-Length' and ':' . That's the reason Firefox ignored the content length header and reading the socket. Chrome accepted the header fields with spaces, so the problem didn't occurred in chrome.
After removing the space, program works fine.
It actually loads the page. If you add content-type header you will see the HTML page (Content-Type: text/html; charset=UTF-8\r\n)
Anyway, both in Chrome and in Firefox you will see the connections never stops because the server doesn't close the socket. If you closed csocket, you would see the HTML page in both browsers but as you said it should be a persistent connection.