summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul J. Davis <paul.joseph.davis@gmail.com>2020-02-15 12:15:54 -0600
committerPaul J. Davis <paul.joseph.davis@gmail.com>2020-02-15 12:39:02 -0600
commit8bb8e702364be2e74611234fdc6ba19c8f2f70bb (patch)
treecaf8a7ba67f6566827cc7faeef5870b39e673456
parent81fa3eee6e17d9999796cc0b01b1119bb6a2fb05 (diff)
downloadcouchdb-8bb8e702364be2e74611234fdc6ba19c8f2f70bb.tar.gz
Remove attachment headers field
I accidentally ported part of the old couch_att test suite into an actual "feature" that's not actually accessible through any API.
-rw-r--r--src/couch/src/couch_att.erl24
1 files changed, 7 insertions, 17 deletions
diff --git a/src/couch/src/couch_att.erl b/src/couch/src/couch_att.erl
index 2c3336291..837170c99 100644
--- a/src/couch/src/couch_att.erl
+++ b/src/couch/src/couch_att.erl
@@ -88,8 +88,7 @@
md5 := binary() | undefined,
revpos := non_neg_integer(),
data := data_prop_type(),
- encoding := identity | gzip | undefined,
- headers := [{binary(), binary()}] | undefined
+ encoding := identity | gzip | undefined
}.
@@ -102,8 +101,7 @@ new() ->
md5 => undefined,
revpos => 0,
data => undefined,
- encoding => undefined,
- headers => undefined
+ encoding => undefined
}.
@@ -203,8 +201,7 @@ to_disk_term(Att) ->
fetch(disk_len, Att),
fetch(revpos, Att),
fetch(md5, Att),
- fetch(encoding, Att),
- fetch(headers, Att)
+ fetch(encoding, Att)
}}.
@@ -217,8 +214,7 @@ from_disk_term(#{} = Db, DocId, {?CURRENT_ATT_FORMAT, Props}) ->
DiskLen,
RevPos,
Md5,
- Encoding,
- Headers
+ Encoding
} = Props,
new([
{name, Name},
@@ -228,8 +224,7 @@ from_disk_term(#{} = Db, DocId, {?CURRENT_ATT_FORMAT, Props}) ->
{disk_len, DiskLen},
{revpos, RevPos},
{md5, Md5},
- {encoding, Encoding},
- {headers, Headers}
+ {encoding, Encoding}
]).
@@ -329,8 +324,7 @@ to_json(Att, OutputData, DataToFollow, ShowEncoding) ->
att_len := AttLen,
revpos := RevPos,
md5 := Md5,
- encoding := Encoding,
- headers := Headers
+ encoding := Encoding
} = Att,
Props = [
{<<"content_type">>, Type},
@@ -361,11 +355,7 @@ to_json(Att, OutputData, DataToFollow, ShowEncoding) ->
true ->
[]
end,
- HeadersProp = case Headers of
- undefined -> [];
- Headers -> [{<<"headers">>, Headers}]
- end,
- {Name, {Props ++ DigestProp ++ DataProps ++ EncodingProps ++ HeadersProp}}.
+ {Name, {Props ++ DigestProp ++ DataProps ++ EncodingProps}}.
flush(Db, DocId, Att1) ->