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-03-02 12:26:22 -0600
commitf4a9e60eee99dd9d4f87153a32c88b78788b49c2 (patch)
tree38bc05df37e3cec1c1c4f93c72dd755a4b85158e
parentcad91ad448fead74dd0f0aa83aed8515b865278f (diff)
downloadcouchdb-f4a9e60eee99dd9d4f87153a32c88b78788b49c2.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) ->