Return-Path: X-Original-To: apmail-trafficserver-dev-archive@www.apache.org Delivered-To: apmail-trafficserver-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9C89E18E6B for ; Tue, 7 Jul 2015 06:59:03 +0000 (UTC) Received: (qmail 61225 invoked by uid 500); 7 Jul 2015 06:58:58 -0000 Delivered-To: apmail-trafficserver-dev-archive@trafficserver.apache.org Received: (qmail 61155 invoked by uid 500); 7 Jul 2015 06:58:58 -0000 Mailing-List: contact dev-help@trafficserver.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@trafficserver.apache.org Delivered-To: mailing list dev@trafficserver.apache.org Received: (qmail 61143 invoked by uid 99); 7 Jul 2015 06:58:58 -0000 Received: from Unknown (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Jul 2015 06:58:58 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id BB576C068C for ; Tue, 7 Jul 2015 06:58:57 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.121 X-Spam-Level: X-Spam-Status: No, score=-0.121 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id 1M8V_yjgDrdw for ; Tue, 7 Jul 2015 06:58:57 +0000 (UTC) Received: from mail-yk0-f173.google.com (mail-yk0-f173.google.com [209.85.160.173]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTPS id E4F0F25034 for ; Tue, 7 Jul 2015 06:58:56 +0000 (UTC) Received: by ykdr198 with SMTP id r198so169514858ykd.3 for ; Mon, 06 Jul 2015 23:58:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=n5MKnM2LkyPSpeyq6eX5h/R68B4hzi6WKXXIXsDkbHg=; b=uSebAi01YnlxcCUwGpB3hJF53pzaEx+Xj7nNRgfC8OrMfov7dvU0zSnwt/xWwMj5yT loJtx4va9LYnBPe63ld7BAY5lRxmci/XT66CKcn7OL1pbf/vE8CvfN161SuL3B+WGynW HxoUtdNGfEb1DorFTYpW2tDyTM12scJNKqHWmqtWEzsHoE6/h8jrA5v4AfN8EK1QWzL3 EJHiNN/cKPFPiaSu64jznr4+tEXa35ZMgCFQ7MeEdwc+KZa0lsQTxVuZoqP8252/hb4j jZw4Vp4bakyQSUOjgR/7t0k8tf6eyW4FNKQcXHQE8X4bgOAyQHmeex2WqcO+1NJuJl3G LyVA== MIME-Version: 1.0 X-Received: by 10.13.247.3 with SMTP id h3mr3333182ywf.142.1436252336028; Mon, 06 Jul 2015 23:58:56 -0700 (PDT) Received: by 10.37.58.2 with HTTP; Mon, 6 Jul 2015 23:58:56 -0700 (PDT) Date: Tue, 7 Jul 2015 08:58:56 +0200 Message-ID: Subject: Binary body in plugin of traffic server From: =?UTF-8?B?SmnFmcOtIFBvZGhvcnNrw70=?= To: dev@trafficserver.apache.org Content-Type: text/plain; charset=UTF-8 Hello, can be binary body of http response accessed from some plugin of ATS, for example jpg picture? I tried to look for it in TransformationPlugin https://docs.trafficserver.apache.org/en/latest/api/classatscppapi_1_1TransformationPlugin.html, but there is only sentence about producing binary body: "size_t atscppapi::TransformationPlugin::produce ( const std::string & ) This method is how a TransformationPlugin will produce output for the downstream transformation plugin, if you need to produce binary data this can still be done with strings by a call to string::assign() or by constructing a string with string::string(char *, size_t). " but method "consume" for loading data is not called for binary data in my testing plugin, only for plaintext pages. That is strange, because transformation plugin can receive and send messages from and to another transformation plugin. So, next transformation plugin should be able to accept binary body, when I can send it by "produce" method. Can you explain it for me? I'm using trafficserver 5.3. Thanks. Jiri