mime

Protocol Buffers MIME problem

萝らか妹 提交于 2019-12-10 11:35:12
问题 Help! Trying to implement Protocol Buffers via Rest (Jersey), but get this exception. class com.util.ProtobufMessageBodyReader class com.util.ProtobufMessageBodyWriter Jul 6, 2010 3:43:37 PM org.apache.coyote.http11.Http11Protocol start INFO: Starting Coyote HTTP/1.1 on http-9102 Jul 6, 2010 3:43:37 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 45485 ms Jul 6, 2010 3:49:00 PM org.apache.catalina.connector.CoyoteAdapter convertURI SEVERE: Invalid URI encoding; using

Outlook 2013 invite not showing embeded attachment - text/calendar;method=REQUEST

孤街浪徒 提交于 2019-12-10 11:15:28
问题 Im creating an email with a text/calendar type. It has 3 alternate views: text, html, and the last is the meeting invite or .ics. I am not attaching the ics, but rather placing it in the content of the third view. When I send it, outlook 2013 correctly receives the invite and shows the Accept/Tentative/Decline buttons at the top of the message. However when I try to embed an attachment into the event/meeting it simply doesnt grab it. If I send the ics as an attachment, it will have them

S/mime timestamp support

点点圈 提交于 2019-12-10 10:54:47
问题 OK now I do have the timestamp from a TS provider. How am I supposed to put it in a mime message so to comply with the standards? As far as I know, no mailer supports timestamping, and this will not be a problem because I will be handling the mime message myself. However I want to make it the standard way... any examples? Thanks. 回答1: I think @Michael's own answer is just quite there with the following caveats: An application/timestamp-reply is intended to transport a TimeStampResp which may

Strip attachments from emails using MailKit / MimeKit

坚强是说给别人听的谎言 提交于 2019-12-10 09:55:33
问题 I'm using MailKit library to handle emails, which has been working well. However, I'm trying to split emails into their constituent files a) Main email (no attachments) b) Individual attachment files, to store on the filesystem. I can save the attachments individually, but can't seem to remove them from the email body code. I.e. they're getting saved along with the main email, so duplicating data. :/ I've tried: foreach (MimePart part in inMessage.BodyParts) { if (part.IsAttachment) { //

MIME类型

拟墨画扇 提交于 2019-12-10 08:30:50
MIME类型,也叫媒体类型。用来定义一个文档/文件/字节流的性质和格式。 大小写不敏感,但是一般都是小写。 通用格式如下: type/subType // 其中type是主类型,分为单独类型和复合类型两种。 // 单独类型(根据文件分类)有:text(普通文本)、application(二进制数据)、image(图片)、video(视频)、audio(音频) // 复合类型:multipart(一般指FormData类型的表单提交) 常见的MIMIE类型 1. type为text 1. text/css 表明文件类型为css文件 <link type="text/css" href="xxxx" rel="stylesheet"> 2. text/babel 表明js内容使用了JSX语法 <script type="text/babel"></script> 3. text/html 指定文件类型是html文件 // 如在请求头中 Accept: text/html 4. text/plain 默认文本类型 // 如在请求头中 Accept: text/plain 2. type为application 1. application/json ajax请求中,指定数据类型是json格式,并希望服务器返回格式也是json fetch(url, { method: 'POST',

S/MIME——邮件安全守护者

时光总嘲笑我的痴心妄想 提交于 2019-12-10 08:14:15
在过去的二十几年里,电子邮件由于其成本低、效率高的特性,已经成为世界领先的通信媒体之一,其速度甚至超过了电话和传统的邮件服务。 近年来,邮件安全问题日益突出,电子邮件很容易成为被黑客瞄准的目标,沦为诈骗、勒索软件攻击的重灾区。攻击的手段也更加高明。恶意邮件的占比屡创新高,邮件泄密事件可谓是层出不穷,其颠覆性的鱼叉式钓鱼攻击软件甚至企图干涉2016年美国总统大选。 美国邮件门回顾 希拉里在担任国务卿期间,使用私人电子邮箱和位于家中的私人服务器收发大量涉密邮件。2016年夏季,美国民主党全国委员会、筹款委员会、竞选团队被黑客组织入侵,近2万封邮件被维基解密披露。邮件显示,希拉里涉嫌抹黑竞争对手,以及可能涉嫌洗钱等财务问题。最终,希拉里因“邮件门”最终落败美国总统竞选。 威胁种类 虽然电子邮件的安全经常被看作是一个独立的问题,实际上它是几种不同威胁的混合物,这些威胁都可以单独地破坏计算机及欺诈收件人,而且可以损害邮件的有效性、可靠性及人们对邮件系统的信任。电子邮件威胁可被分为几种不同的种类: 名称 威胁 病毒、蠕虫、特洛伊木马 三种罪大恶极的恶意代码可以作为电子邮件附件诱使用户打开或运行,它们就可以破坏一台主机系统的数据,将计算机变成可被远程控制的网络僵尸,甚至可以导致收件人经济上的巨大损失。 网络钓鱼 钓鱼攻击可以利用社交网络工程窃取个人的信息和财务金融数据。这种攻击主要依赖“伪造

Server implementation of RFC 2388 multipart POST conflict with RFC 2047?

本秂侑毒 提交于 2019-12-10 03:29:12
问题 I'm trying to implement RFC 2388 on a HTTP server to support multipart POST. I am looking at the specification specifically at the content-disposition's "name" parameter. Under section 3 of RFC 2388 it states: Field names originally in non-ASCII character sets may be encoded within the value of the "name" parameter using the standard method described in RFC 2047. I have 'heard' that no UA currently support RFC2047 on form control names. They will simply send the text in it's original encoding

python 发送各种形式的 邮件

安稳与你 提交于 2019-12-09 12:43:36
文件形式的邮件 !/usr/bin/env python3 coding: utf-8 import smtplib from email.mime.text import MIMEText from email.header import Header sender = '***' receiver = '***' subject = 'python email test' smtpserver = 'smtp.163.com' username = '***' password = '***' msg = MIMEText('你好','text','utf-8') 中文需参数‘utf-8',单字节字符不需要 msg['Subject'] = Header(subject, 'utf-8') smtp = smtplib.SMTP() smtp.connect('smtp.163.com') smtp.login(username, password) smtp.sendmail(sender, receiver, msg.as_string()) smtp.quit() HTML形式的邮件 !/usr/bin/env python3 coding: utf-8 import smtplib from email.mime.text import MIMEText sender

Reliability of Mimetypes in Uploads (PHP)

喜欢而已 提交于 2019-12-09 11:39:58
问题 I've had this question for a while: how exactly is the mime type of a file determined? I believe this is done by checking if specific bytes of the file contain any of the known magic numbers / file signatures, right? If so, this poses another question, lets say I upload a bash script with a fake GIF file signature to a website that only allows images to be uploaded, what is going to happen? Either: the mimetype detection routine is smart enough to detect fake signatures, or image/gif is

PHP PNG images are being uploaded with mime “image/jpeg” on KCFINDER 3.12

我与影子孤独终老i 提交于 2019-12-09 06:03:26
At this point, I'm very confused for something an image called this-thing.png (created as PNG24 out of photoshop CS5 ), gets uploaded to kcfinder as image/jpeg . Analyzed with TriID , shows the image is completely 100% PNG C:\TrID>trid C:\users\michael\downloads\this-thing.png TrID/32 - File Identifier v2.20 - (C) 2003-15 By M.Pontello Definitions found: 3790 Analyzing... Collecting data from file: C:\users\michael\downloads\this-thing.png 100.0% (.PNG) Portable Network Graphics (16000/1) But when the variable data within $_FILES[(key($_FILES)]['tmp_name'] , reaches kcfinder\core\class\browser