Re: [trafficserver] 01/01: Merge pull request #540 from masaori335/ts-4087_doc

2016-04-10 Thread Masaori Koshiba
Sorry for my gmail.com email address is used for Author and Committer.
My email settings on GitHub was wrong. I changed my primary GitHub email
address to masa...@apache.org.
If you have multiple email addresses on GitHub, please be careful.

- Masaori

2016年4月11日(月) 12:02 :

> This is an automated email from the ASF dual-hosted git repository.
>
> masaori pushed a commit to branch master
> in repository https://git-dual.apache.org/repos/asf/trafficserver.git
>
> commit 58d7710b9bdfbd35eabc3545c8c501d933c40d34
> Merge: cbd094c e7951c6
> Author: Masaori Koshiba 
> AuthorDate: Mon Apr 11 12:02:05 2016 +0900
>
> Merge pull request #540 from masaori335/ts-4087_doc
>
> TS-4087: Docs: About new settings to limit streams
>
>  doc/admin-guide/files/records.config.en.rst | 14 ++
>  1 file changed, 14 insertions(+)
>
>
> --
> To stop receiving notification emails like this one, please contact
> "commits@trafficserver.apache.org" .
>


[trafficserver] 01/01: Merge pull request #540 from masaori335/ts-4087_doc

2016-04-10 Thread masaori
This is an automated email from the ASF dual-hosted git repository.

masaori pushed a commit to branch master
in repository https://git-dual.apache.org/repos/asf/trafficserver.git

commit 58d7710b9bdfbd35eabc3545c8c501d933c40d34
Merge: cbd094c e7951c6
Author: Masaori Koshiba 
AuthorDate: Mon Apr 11 12:02:05 2016 +0900

Merge pull request #540 from masaori335/ts-4087_doc

TS-4087: Docs: About new settings to limit streams

 doc/admin-guide/files/records.config.en.rst | 14 ++
 1 file changed, 14 insertions(+)


-- 
To stop receiving notification emails like this one, please contact
"commits@trafficserver.apache.org" .


[trafficserver] branch master updated (cbd094c -> 58d7710)

2016-04-10 Thread masaori
This is an automated email from the ASF dual-hosted git repository.

masaori pushed a change to branch master
in repository https://git-dual.apache.org/repos/asf/trafficserver.git.

  from  cbd094c   TS-4313: Fix a bug in MIME caused by improper type 
conversion
  adds  e7951c6   TS-4087: Docs: About new settings to limit streams
   new  58d7710   Merge pull request #540 from masaori335/ts-4087_doc

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "adds" were already present in the repository and have only
been added to this reference.


Summary of changes:
 doc/admin-guide/files/records.config.en.rst | 14 ++
 1 file changed, 14 insertions(+)

-- 
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" '].


[trafficserver] branch master updated: TS-4313: Fix a bug in MIME caused by improper type conversion

2016-04-10 Thread maskit
This is an automated email from the ASF dual-hosted git repository.

maskit pushed a commit to branch master
in repository https://git-dual.apache.org/repos/asf/trafficserver.git

The following commit(s) were added to refs/heads/master by this push:
   new  cbd094c   TS-4313: Fix a bug in MIME caused by improper type 
conversion
cbd094c is described below

commit cbd094c34d465edbfc637efc10c90da7fe4648f6
Author: Masakazu Kitajo 
AuthorDate: Wed Mar 30 17:56:31 2016 +0900

TS-4313: Fix a bug in MIME caused by improper type conversion

The old logic picks up a wrong block due to overflow that is caused by 
improper type conversion.
This fixes the type conversion and make sure that the block contains the 
field.
---
 .gitignore  |  1 +
 proxy/hdrs/MIME.cc  | 39 ++
 proxy/hdrs/MIME.h   |  1 +
 proxy/hdrs/Makefile.am  | 14 +++
 proxy/hdrs/test_mime.cc | 64 +
 5 files changed, 109 insertions(+), 10 deletions(-)

diff --git a/.gitignore b/.gitignore
index bf65b4e..4a7b81c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -87,6 +87,7 @@ iocore/eventsystem/test_Buffer
 iocore/eventsystem/test_Event
 proxy/config/records.config.default
 proxy/config/storage.config.default
+proxy/hdrs/test_mime
 proxy/http2/test_Huffmancode
 
 plugins/header_rewrite/header_rewrite_test
diff --git a/proxy/hdrs/MIME.cc b/proxy/hdrs/MIME.cc
index 2907d35..b0dbc82 100644
--- a/proxy/hdrs/MIME.cc
+++ b/proxy/hdrs/MIME.cc
@@ -473,7 +473,8 @@ mime_hdr_set_accelerator_slotnum(MIMEHdrImpl *mh, int32_t 
slot_id, uint32_t slot
 inline void
 mime_hdr_set_accelerators_and_presence_bits(MIMEHdrImpl *mh, MIMEField *field)
 {
-  int slot_id, slot_num;
+  int slot_id;
+  ptrdiff_t slot_num;
   if (field->m_wks_idx < 0)
 return;
 
@@ -481,11 +482,20 @@ mime_hdr_set_accelerators_and_presence_bits(MIMEHdrImpl 
*mh, MIMEField *field)
 
   slot_id = hdrtoken_index_to_slotid(field->m_wks_idx);
   if (slot_id != MIME_SLOTID_NONE) {
-slot_num = (field - &(mh->m_first_fblock.m_field_slots[0]));
-if ((slot_num >= 0) && (slot_num < MIME_FIELD_SLOTNUM_UNKNOWN))
-  mime_hdr_set_accelerator_slotnum(mh, slot_id, slot_num);
-else
-  mime_hdr_set_accelerator_slotnum(mh, slot_id, 
MIME_FIELD_SLOTNUM_UNKNOWN);
+if (mh->m_first_fblock.contains(field)) {
+  slot_num = (field - &(mh->m_first_fblock.m_field_slots[0]));
+  // constains() assure that the field is in the block, and the calculated
+  // slot_num will be between 0 and 15, which seem valid.
+  // However, strangely, this function regards slot number 14 and 15 as
+  // unknown for some reason that is not clear. It might be a bug.
+  // The block below is left to keep the original behavior. See also 
TS-4316.
+  if (slot_num >= MIME_FIELD_SLOTNUM_UNKNOWN) {
+slot_num = MIME_FIELD_SLOTNUM_UNKNOWN;
+  }
+} else {
+  slot_num = MIME_FIELD_SLOTNUM_UNKNOWN;
+}
+mime_hdr_set_accelerator_slotnum(mh, slot_id, slot_num);
   }
 }
 
@@ -1640,10 +1650,11 @@ mime_hdr_field_slotnum(MIMEHdrImpl *mh, MIMEField 
*field)
 
   slots_so_far = 0;
   for (fblock = &(mh->m_first_fblock); fblock != NULL; fblock = 
fblock->m_next) {
-MIMEField *first = &(fblock->m_field_slots[0]);
-int block_slot = (int)(field - first); // in units of MIMEField
-if ((block_slot >= 0) && (block_slot < MIME_FIELD_BLOCK_SLOTS))
-  return (slots_so_far + block_slot);
+if (fblock->contains(field)) {
+  MIMEField *first = &(fblock->m_field_slots[0]);
+  ptrdiff_t block_slot = field - first; // in units of MIMEField
+  return slots_so_far + block_slot;
+}
 slots_so_far += MIME_FIELD_BLOCK_SLOTS;
   }
   return -1;
@@ -3615,6 +3626,14 @@ MIMEFieldBlockImpl::strings_length()
   return ret;
 }
 
+bool
+MIMEFieldBlockImpl::contains(const MIMEField *field)
+{
+  MIMEField *first = &(m_field_slots[0]);
+  MIMEField *last = &(m_field_slots[MIME_FIELD_BLOCK_SLOTS - 1]);
+  return (field >= first) && (field <= last);
+}
+
 void
 MIMEFieldBlockImpl::check_strings(HeapCheck *heaps, int num_heaps)
 {
diff --git a/proxy/hdrs/MIME.h b/proxy/hdrs/MIME.h
index f882df1..5e4f4e3 100644
--- a/proxy/hdrs/MIME.h
+++ b/proxy/hdrs/MIME.h
@@ -194,6 +194,7 @@ struct MIMEFieldBlockImpl : public HdrHeapObjImpl {
   void unmarshal(intptr_t offset);
   void move_strings(HdrStrHeap *new_heap);
   size_t strings_length();
+  bool contains(const MIMEField *field);
 
   // Sanity Check Functions
   void check_strings(HeapCheck *heaps, int num_heaps);
diff --git a/proxy/hdrs/Makefile.am b/proxy/hdrs/Makefile.am
index f0a6515..428ba1c 100644
--- a/proxy/hdrs/Makefile.am
+++ b/proxy/hdrs/Makefile.am
@@ -59,6 +59,20 @@ load_http_hdr_LDADD = -L. -lhdrs \
   @LIBTCL@
 load_http_hdr_LDFLAGS = @EXTRA_CXX_LDFLAGS@ @LIBTOOL_LINK_FLAGS@
 
+check_PROGRAMS = test_mime
+
+TESTS = test_mime
+
+test_mime_LDADD = -L. -lhdrs \
+  

[trafficserver] branch matt-test updated: trivial commit to check github commits work

2016-04-10 Thread humbedooh
This is an automated email from the ASF dual-hosted git repository.

humbedooh pushed a commit to branch matt-test
in repository https://git-dual.apache.org/repos/asf/trafficserver.git

The following commit(s) were added to refs/heads/matt-test by this push:
   new  75b988b   trivial commit to check github commits work
75b988b is described below

commit 75b988b4f6e25b321142fd046057d7a2cf18d8a3
Author: Daniel Gruno 
AuthorDate: Sun Apr 10 15:15:08 2016 +0200

trivial commit to check github commits work
---
 README | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/README b/README
index 3d7756b..24c90d1 100644
--- a/README
+++ b/README
@@ -283,3 +283,5 @@ the installation with
   Web page: https://trafficserver.apache.org/
   Wiki: http://cwiki.apache.org/confluence/display/TS/
   User mailing list: us...@trafficserver.apache.org
+
+

-- 
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" '].


[trafficserver] branch matt-test created (now 48d7b25)

2016-04-10 Thread humbedooh
This is an automated email from the ASF dual-hosted git repository.

humbedooh pushed a change to branch matt-test
in repository https://git-dual.apache.org/repos/asf/trafficserver.git.

at  48d7b25   Minor cleanup to always use ink_gettimeofday.

No new revisions were added by this update.

-- 
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" '].