Lines Matching refs:line

11 	struct message_header_line line;
58 struct message_header_line *line = &ctx->line;
66 if (line->eoh)
69 if (line->continues)
72 /* new header line */
73 line->name_offset = ctx->input->v_offset;
80 continued = line->continues;
132 /* a) line is larger than input buffer
173 line->full_value_offset =
200 /* we don't know if the line continues. */
203 /* got a line */
205 /* skipping a line with a huge header name */
243 last_crlf = line->crlf_newline &&
245 last_no_newline = line->no_newline ||
248 line->continues = continues;
249 line->continued = continued;
250 line->crlf_newline = crlf_newline;
251 line->no_newline = no_newline;
254 line->eoh = TRUE;
255 line->name_len = line->value_len = line->full_value_len = 0;
256 line->name = ""; line->value = line->full_value = NULL;
257 line->middle = NULL; line->middle_len = 0;
258 line->full_value_offset = line->name_offset;
259 line->continues = FALSE;
260 } else if (line->continued) {
261 line->value = msg;
262 line->value_len = size;
264 /* missing ':', assume the whole line is name */
265 line->value = NULL;
266 line->value_len = 0;
270 line->name = str_c(ctx->name);
271 line->name_len = str_len(ctx->name);
273 line->middle = NULL;
274 line->middle_len = 0;
278 line->value = msg + colon_pos+1;
279 line->value_len = size - colon_pos - 1;
287 for (pos = 0; pos < line->value_len; pos++) {
288 if (!IS_LWSP(line->value[pos]))
292 if (pos == line->value_len) {
294 if (line->value_len > 0 &&
295 IS_LWSP(line->value[0]))
299 pos = line->value_len > 0 &&
300 IS_LWSP(line->value[0]) ? 1 : 0;
303 line->value += pos;
304 line->value_len -= pos;
305 line->full_value_offset += pos;
319 line->middle = msg + colon_pos;
320 line->middle_len = (size_t)(line->value - line->middle);
321 str_append_n(ctx->name, line->middle, line->middle_len);
323 line->name = str_c(ctx->name);
324 line->name_len = colon_pos;
325 line->middle = str_data(ctx->name) + line->name_len + 1;
328 if (!line->continued) {
329 /* first header line. make a copy of the line since we can't
331 buffer_append(ctx->value_buf, line->value, line->value_len);
332 line->value = line->full_value = ctx->value_buf->data;
333 line->full_value_len = line->value_len;
334 } else if (line->use_full_value) {
337 /* line is longer than fit into our buffer, so we
346 line->value_len > 0 && line->value[0] != ' ' &&
347 IS_LWSP(line->value[0])) {
350 line->value + 1, line->value_len - 1);
353 line->value, line->value_len);
355 line->full_value = ctx->value_buf->data;
356 line->full_value_len = ctx->value_buf->used;
358 /* we didn't want full_value, and this is a continued line. */
359 line->full_value = NULL;
360 line->full_value_len = 0;
364 line->use_full_value = FALSE;
372 *hdr_r = line;